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

object Main {

  class UnionFind(n: Int) {
    val par: Array[Int] = (0 until n).toArray

    def getRootOf(x: Int): Int = {
      if (par(x) == x) {
        x
      } else {
        val r = getRootOf(par(x))
        par(x) = r
        r
      }
    }

    def unite(x: Int, y: Int): Unit = {
      val rx = getRootOf(x)
      val ry = getRootOf(y)

      if (rx != ry) {
        par(rx) = ry
      }
    }

    def isSameTree(x: Int, y: Int): Boolean = {
      getRootOf(x) == getRootOf(y)
    }
  }

  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 = Array.ofDim[Array[Int]](m)
    for {
      i <- 0 until m
    } yield {
      friends(i) = in.readLine().split("\\s").map(_.toInt - 1)
    }

    val unionFind = new UnionFind(n)
    val friendsNum = Array.ofDim[Int](n)
    for {
      i <- 0 until m
    } {
      unionFind.unite(friends(i)(0), friends(i)(1))
      friendsNum(friends(i)(0)) += 1
      friendsNum(friends(i)(1)) += 1
    }

    val blocks = Array.ofDim[Array[Int]](k)
    for {
      i <- 0 until k
    } yield {
      blocks(i) = in.readLine().split("\\s").map(_.toInt - 1)
    }

    val root2Size = (0 until n).map(unionFind.getRootOf).foldLeft(Array.ofDim[Int](n)) {
      case (acc, root) =>
        acc(root) += 1
        acc
    }

    for {
      p <- 0 until n
    } {
      if (p != 0) {
        out.print(" ")
      }
      out.print(
        root2Size(unionFind.getRootOf(p)) -
          friendsNum(p) -
          blocks.count {
            case Array(b1, b2) =>
              (p == b1 || p == b2) && unionFind.isSameTree(b1, b2)
          } - 1
      )
    }
      out.println()
    out.flush()
  }
}
