class UnionFind(n: Int) {
    private val parent = IntArray(n, {-1})
    private val rank = IntArray(n, {0})
    private val size = IntArray(n, {1})
    private var numTree = n

    fun find(x: Int): Int {
        if (parent[x] == -1) {
            return x
        } else {
            parent[x] = find(parent[x])
            return parent[x]
        }
    }

    fun isSame(x: Int, y: Int): Boolean {
        return find(x) == find(y)
    }

    fun getSize(): Int {
        return numTree
    }

    fun sizeOf(x: Int): Int {
        return size[find(x)]
    }

    fun rankOf(x: Int): Int {
        return rank[find(x)]
    }

    fun unite(x: Int, y: Int) {
        val parentX = find(x)
        val parentY = find(y)

        if (parentX == parentY) {
            return
        }

        numTree--

        if (rank[parentX] < rank[parentY]) {
            parent[parentX] = parentY
            size[parentY] += size[parentX]
        } else {
            parent[parentY] = parentX
            size[parentX] += size[parentY]
            if (rank[parentX] == rank[parentY]) {
                rank[parentX]++
            }
        }
    }
}

fun main(args: Array<String>) {
    val (N, M, K) = readInputLine().split(" ").map { it.toInt() }
    val unionFind = UnionFind(N)

    val friends = Array(N) { mutableSetOf<Int>() }
    val blocks = Array(N) { mutableSetOf<Int>() }

    for (i in 0 until M) {
        val (a, b) = readInputLine().split(" ").map { it.toInt() - 1 }
        friends[a].add(b)
        friends[b].add(a)
        unionFind.unite(a, b)
    }

    for (i in 0 until K) {
        val (c, d) = readInputLine().split(" ").map { it.toInt() - 1 }
        blocks[c].add(d)
        blocks[d].add(c)
    }

    val ans = IntArray(N)

    for (i in 0 until N) {
        var ansTmp = unionFind.sizeOf(i) - 1
        ansTmp -= friends[i].size
        for (b in blocks[i]) {
            if (unionFind.isSame(i, b)) {
                ansTmp--
            }
        }
        ans[i] = ansTmp
    }

    println(ans.joinToString(" "))
}

fun readInputLine(): String {
    return readLine()!!
}
