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

object Main extends App {

  def walk(main: Node, check: Node, suggest: mutable.Set[Int], visited: mutable.Set[Int]): Unit = {
    if (!visited.contains(check.id)) {
      visited.add(check.id)

      check.friends.foreach { fid =>
        if (main.id != fid && !main.friends.contains(fid) && !main.blocks.contains(fid)) {
          suggest.add(fid)
        }
        walk(main, nodePool(fid), suggest, visited)
      }
    }
  }

  val firstLine = readLine.split(" ").map(_.toInt)
  val N = firstLine(0)
  val M = firstLine(1)
  val K = firstLine(2)

  val nodePool = Range(0, N).map(i => Node(i, mutable.Set.empty, mutable.Set.empty))
  for (_ <- 0 until M) {
    val friendship = readLine.split(" ").map(_.toInt - 1)
    nodePool(friendship(0)).friends.add(friendship(1))
    nodePool(friendship(1)).friends.add(friendship(0))
  }
  for (_ <- 0 until K) {
    val blockship = readLine.split(" ").map(_.toInt - 1)
    nodePool(blockship(0)).blocks.add(blockship(1))
    nodePool(blockship(1)).blocks.add(blockship(0))
  }

  // nodePool.foreach(n => println(n))

  for (i <- 0 until N) {
    val suggest = mutable.Set.empty[Int]
    val visited = mutable.Set.empty[Int]
    val node = nodePool(i)

    walk(node, node, suggest, visited)

    print(s"${suggest.size} ")
  }
  print("\n")
}

case class Node (id: Int, friends: mutable.Set[Int], blocks: mutable.Set[Int])
