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

import scala.collection.mutable

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

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

    type Person = Int
    type ClusterId = Int

    val person2ClusterId = mutable.HashMap.empty[Person, ClusterId]
    val person2FriendsSize = mutable.HashMap.empty[Person, Int]
    val clusterId2size = mutable.HashMap.empty[ClusterId, Int]

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

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

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

    var clusterNum = 0

    for {
      p <- 1 to n
      if !person2ClusterId.contains(p)
    } yield {
      clusterNum += 1
      val clusterId = clusterNum
      person2ClusterId.update(p, clusterId)

      val edges = new mutable.Stack[Person]
      edges.push(p)
      var clusterSize = 1

      while (edges.nonEmpty) {
        val p = edges.pop()
        val fs = myFriends(p)
        person2FriendsSize.update(p, fs.length)

        fs.filter { f =>
          !person2ClusterId.contains(f)
        }.foreach { f =>
          clusterSize += 1
          edges.push(f)
          person2ClusterId.update(f, clusterId)
        }
      }

      clusterId2size.update(clusterId, clusterSize)
    }

    for {
      p <- 1 to n
    } {
      val clusterId = person2ClusterId(p)
      val friendsSize = person2FriendsSize(p)
      val bpsSize = myBlocks(p).count { bp =>
        person2ClusterId(bp) == clusterId
      }
      if (p != 1) {
        out.print(" ")
      }
      out.print(clusterId2size(clusterId) - friendsSize - bpsSize - 1)
    }
    out.println()
    out.flush()
  }
}
