import io.StdIn._
import scala.collection.mutable

object Main extends App {
  val Array(n, m, k) = readLine.split(" ").map(_.toInt)

  val friends = Array.fill(n)(Array.empty[Int])
  for (_ <- 0 until m) {
    val Array(a, b) = readLine.split(" ").map(_.toInt - 1)
    friends(a) :+= b
    friends(b) :+= a
  }

  val blocks = Array.fill(n)(Array.empty[Int])
  for (_ <- 0 until k) {
    val Array(a, b) = readLine.split(" ").map(_.toInt - 1)
    blocks(a) :+= b
    blocks(b) :+= a
  }

  val memberToGroup = Array.fill(n)(-1)
  val groupSizes = mutable.Map.empty[Int, Int]
  val checked = mutable.Set.empty[Int]
  for (i <- 0 until n) {
    groupSizes.put(i, 0)
    if (!checked.contains(i)) {
      val stack = mutable.Stack[Int](i +: friends(i):_*)
      while (stack.nonEmpty) {
        val next = stack.pop
        if (!checked.contains(next)) {
          memberToGroup(next) = i
          groupSizes.put(i, groupSizes(i) + 1)
          checked.add(next)
          stack.pushAll(friends(next))
        }
      }
    }
  }

  val ans = Range(0, n).map { i =>
    val gid = memberToGroup(i)
    val blocked = blocks(i).count(b => memberToGroup(b) == gid)
    groupSizes(gid) - (1 + friends(i).length + blocked)
  }

  println(ans.mkString(" "))
}