import io.StdIn._
import scala.collection.mutable
 
object Main extends App {
  val firstLine = readLine.split(" ").map(_.toInt)
  val N = firstLine(0)
  val M = firstLine(1)
  val K = firstLine(2)
 
  val friends = Array.fill(N + 1)(Array.empty[Int])
  val blocks = Array.fill(N + 1)(Array.empty[Int])
 
  for (_ <- 0 until M) {
    val friendship = readLine.split(" ").map(_.toInt)
    val a = friendship(0);
    val b = friendship(1);
    friends(a) :+= b
    friends(b) :+= a
  }
 
  for (_ <- 0 until K) {
    val blockship = readLine.split(" ").map(_.toInt)
    val a = blockship(0)
    val b = blockship(1)
    blocks(a) :+= b
    blocks(b) :+= a
  }
 
  val groupNumbered = Array.fill(N + 1)(-1)
  val checked = mutable.Set.empty[Int]
 
  for (i <- 1 to N) {
    if (!checked.contains(i)) {
      val stack = mutable.Stack[Int](friends(i):_*)
      while (stack.nonEmpty) {
        val next = stack.pop
        groupNumbered(next) = i
        checked.add(next)
        stack.pushAll(friends(next).filterNot(checked.contains))
      }
      checked.add(i)
    }
  }
 
  for (i <- 1 to N) {
    val groupId = groupNumbered(i)
 
    val count = groupNumbered.zipWithIndex.count { case (gid, id) =>
      gid == groupId && // 同じグループ
      id != i && // 自分自身ではなく
      !blocks(i).contains(id) && // ブロック関係でなく
      !friends(i).contains(id) // 直接の友人関係でもない
    }
 
    print(s"$count ")
  }
 
  print("\n")
}