object Main extends App {
	import scala.collection.mutable.Map
	val sc = new java.util.Scanner(System.in)
	val pw = new java.io.PrintWriter(System.out)
	
	val n, m, k = sc.nextInt
	
	val f = Array.fill(n)(Array.fill(n)(true))
	
	val candidate = UnionFind(0 until n)
	
	Seq.fill(m)((sc.nextInt-1, sc.nextInt-1)) foreach { case (a, b) =>
		f(a)(b) = false
		f(b)(a) = false
		candidate.unite(a, b)
	}
	
	Seq.fill(k)((sc.nextInt-1, sc.nextInt-1)) foreach { case (c, d) =>
		f(c)(d) = false
		f(d)(c) = false
	}

	(0 until n) foreach { i =>
		pw.print( ((0 until n).filter(j => f(i)(j) && candidate.same(i, j)).size - 1).toString + " " )
	}
	pw.flush()
}

case class UnionFind[T](seq: Seq[T]) {
	import scala.collection.mutable.Map
	private[this] val par: Map[T, T] = Map[T,T](seq.map(elem => elem -> elem): _*)

	@scala.annotation.tailrec
	private[this] def find(t: T, acc: Seq[T] = Nil): T = {
		val p = par(t)
		if (p == t) {acc foreach { par(_) = t }; t} else find(p, p +: acc)
	}

	def unite(a: T, b: T): Unit = {
		val pa = find(a)
		val pb = find(b)
		if (pa != pb) par(pa) = pb
	}

	def same(a: T, b: T) = find(a) == find(b)
}
