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 uf = UnionFind.of(N)
  val friendCount = mutable.Map.empty[Int, Int]
  val blocks = mutable.Map.empty[Int, Seq[Int]]

  for (_ <- 0 until M) {
    val friendship = readLine.split(" ").map(_.toInt - 1) // 入力は 1始まり、プログラム上は0始まり
    val a = friendship(0);
    val b = friendship(1);
    uf.unite(a, b)
    friendCount.put(a, friendCount.getOrElse(a, 0) + 1)
    friendCount.put(b, friendCount.getOrElse(b, 0) + 1)
  }
  for (_ <- 0 until K) {
    val blockship = readLine.split(" ").map(_.toInt - 1)
    val a = blockship(0)
    val b = blockship(1)
    blocks.put(a, blocks.getOrElse(a, Seq.empty) :+ b)
    blocks.put(b, blocks.getOrElse(b, Seq.empty) :+ a)
  }

  for (i <- 0 until N) {
    val blockCount = blocks.getOrElse(i, Seq.empty).count(block => uf.same(i, block))
    val ans = uf.size(i) - 1 - friendCount.getOrElse(i, 0) - blockCount
    print(s"${ans} ")
  }
  print("\n")
}

/**
 * d(x) == a として
 * x がツリーの根であれば: a はツリーのサイズ（ノード数) に -1 をかけた数
 * x がツリーの根でなければ: a は関連ノードのインデックス番号
 *
 * @param d
 */
case class UnionFind(d: Array[Int]) {
  def find(x: Int): Int = if (d(x) < 0) x else {
    val root = find(d(x))
    d(x) = root // memoization
    root
  }

  def unite(x: Int, y: Int): Boolean = {
    val xRoot = find(x)
    val yRoot = find(y)

    if (xRoot == yRoot) false
    else {
      if (xRoot < yRoot) {
        d(xRoot) = d(xRoot) + d(yRoot)
        d(yRoot) = xRoot
      } else {
        d(yRoot) = d(yRoot) + d(xRoot)
        d(xRoot) = yRoot
      }
      true
    }
  }

  def same(x: Int, y: Int): Boolean = find(x) == find(y)

  def size(x: Int): Int = -1 * d(find(x))
}

object UnionFind {
  def of(n: Int) = UnionFind(Array.fill[Int](n)(-1))
}
