import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

import scala.collection.mutable
import scala.collection.mutable.ListBuffer

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val Array(n, m, k) = in.readLine().split("\\s").map(_.toInt)

    val friends = (for {
      _ <- 0 until m
    } yield {
      in.readLine().split("\\s").map(_.toInt)
    }).map {
      case Array(a, b) =>
        if (a > b) {
          Array(b, a)
        } else {
          Array(a, b)
        }
    }.sortWith {
      case (Array(a1, b1), Array(a2, b2)) =>
        if (a1 < a2) {
          true
        } else if (a1 > a2) {
          false
        } else {
          b1 < b2
        }
    }

    val blocks = (for {
      _ <- 0 until k
    } yield {
      in.readLine().split("\\s").map(_.toInt)
    }).map {
      case Array(c, d) =>
        if (c > d) {
          Array(d, c)
        } else {
          Array(c, d)
        }
    }.sortWith {
      case (Array(c1, d1), Array(c2, d2)) =>
        if (c1 < c2) {
          true
        } else if (c1 > c2) {
          false
        } else {
          d1 < d2
        }
    }

    val person2Cluster = mutable.HashMap.empty[Int, ListBuffer[Int]]
    val person2Friends = mutable.HashMap.empty[Int, Array[Int]]
    val clusters = ListBuffer.empty[ListBuffer[Int]]

    for {
      i <- 1 to n
      if !person2Cluster.contains(i)
    } yield {
      val cluster = ListBuffer.empty[Int]
      clusters.append(cluster)
      cluster.append(i)
      person2Cluster.update(i, cluster)

      val edges = new mutable.Stack[Int]
      edges.push(i)

      while (edges.nonEmpty) {
        val p = edges.pop()
        val fs = (
          friends.filter(_ (0) == p).map(_ (1)) ++ friends.filter(_ (1) == p).map(_ (0))
          ).toArray
        person2Friends.update(p, fs)

        fs.filter { f =>
          !person2Cluster.contains(f)
        }.foreach { f =>
          cluster.append(f)
          edges.push(f)
          person2Cluster.update(f, cluster)
        }
      }
    }

    out.println(
      (for {
        p <- 1 to n
      } yield {
        val cluster = person2Cluster(p)
        val friends = person2Friends(p)
        val bs = (blocks.filter(_ (0) == p).map(_ (1)) ++ blocks.filter(_ (1) == p).map(_ (0))).filter { b =>
          cluster.contains(b)
        }
        cluster.size - friends.length - bs.size - 1
      }).mkString(" ")
    )
    out.flush()
  }
}
