fun readString() = readLine()!!
fun readInt() = readLine()!!.toInt()
fun readLong() = readLine()!!.toLong()
fun readIntList() = readLine()!!.split(" ").map(String::toInt)
fun readLongList() = readLine()!!.split(" ").map(String::toLong)
fun <T> Array<Array<T>>.print() {
    this.forEach {
        println(it.joinToString(" "))
    }
}

class UnionFind(n: Int) {
    private val parent: MutableList<Int> = MutableList(n) { it }
    private val rank: MutableList<Int> = MutableList(n) { 0 }
    private val _size: MutableList<Int> = MutableList(n) { 1 }

    private fun root(x: Int): Int {
        if (parent[x] == x) return x
        parent[x] = root(parent[x])

        return parent[x]
    }

    fun union(x: Int, y: Int) {
        var rx = root(x)
        var ry = root(y)
        if (rx == ry) return

        if (rank[rx] < rank[ry]) {
            val tmp = rx
            rx = ry
            ry = tmp
        }

        if (rank[rx] == rank[ry]) rank[rx]++

        parent[ry] = rx
        _size[rx] += _size[ry]
    }

    fun isSame(x: Int, y: Int): Boolean = root(x) == root(y)

    fun size(x: Int): Int = _size[root(x)]
}

fun main() {
    val (n, m, k) = readIntList()
    val friendUf = UnionFind(n + 1)
    val notCandidates = Array(n + 1) { mutableListOf<Int>() }

    for (i in 0 until m) {
        val (a, b) = readIntList()
        friendUf.union(a, b)
        notCandidates[a].add(b)
        notCandidates[b].add(a)
    }
    
    for (i in 0 until k) {
        val (c, d) = readIntList()
        if (friendUf.isSame(c, d)) {
            notCandidates[c].add(d)
            notCandidates[d].add(c)
        }
    }

    val friendCandidates = Array(n + 1) { 0 }
    for (i in 1..n) {
        friendCandidates[i] = friendUf.size(i) - notCandidates[i].size - 1
    }

    println(friendCandidates.drop(1).joinToString(separator = " "))
}
