import io.StdIn._

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 = Array.fill(N)(0)
  val blocks = Array.fill(N)(Array.empty[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(a) = friendCount(a) + 1
    friendCount(b) = friendCount(b) + 1
  }
  for (_ <- 0 until K) {
    val blockship = readLine.split(" ").map(_.toInt - 1)
    val a = blockship(0)
    val b = blockship(1)
    blocks(a) = blocks(a) :+ b
    blocks(b) = blocks(b) :+ a
  }

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

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

  def unite(x: Int, y: Int): Boolean = {
    val xRoot = root(x)
    val yRoot = root(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 = root(x) == root(y)

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

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