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)
    }

    val blocks = for {
      _ <- 0 until k
    } yield {
      in.readLine().split("\\s").map(_.toInt)
    }

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

    @inline
    def myRelations(sets: IndexedSeq[Array[Int]], me: Int) = {
      sets.filter(_ (0) == me).map(_ (1)) ++ sets.filter(_ (1) == me).map(_ (0))
    }

    @inline
    def myFriends(me: Int): IndexedSeq[Int] = {
      myRelations(friends, me)
    }

    @inline
    def myBlocks(me: Int): IndexedSeq[Int] = {
      myRelations(blocks, me)
    }

    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 = myFriends(p).toArray
        person2FriendsSize.update(p, fs.length)

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

    val cluster2size = clusters.foldLeft(mutable.HashMap.empty[ListBuffer[Int], Int]) { (acc, c) =>
      acc.update(c, c.size)
      acc
    }

    out.println(
      (for {
        p <- 1 to n
      } yield {
        val cluster = person2Cluster(p)
        val friendsSize = person2FriendsSize(p)
        val bs = myBlocks(p).filter { b =>
          cluster.contains(b)
        }
        cluster2size(cluster) - friendsSize - bs.size - 1
      }).mkString(" ")
    )
    out.flush()
  }
}
