fun main(args: Array<String>) = yorukatsu21d()

fun yorukatsu21d() {
    val (n, m, k) = readLine()!!.split(' ').map { it.toInt() }
    val abList = Array(m) {
        readLine()!!.split(' ').map { it.toInt() - 1 }.let { it[0] to it[1] }
    }
    val cdList = Array(k) {
        readLine()!!.split(' ').map { it.toInt() - 1 }.let { it[0] to it[1] }
    }

    val unionFind = UnionFind(n)
    val count = IntArray(n)

    abList.forEach {
        val (a, b) = it
        unionFind.unite(a, b)
        count[a]--
        count[b]--
    }

    cdList.forEach {
        val (c, d) = it
        if (unionFind.isSame(c, d)) {
            count[c]--
            count[d]--
        }
    }

    val answer = count.mapIndexed { index, l -> unionFind.size(index) + l - 1 }
        .joinToString(" ")

    println(answer)
}

private class UnionFind(initSize: Int) {
    private val parent = IntArray(initSize) { it }
    private val size = LongArray(initSize) { 1L }

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

        val xr = root(parent[x])
        parent[x] = xr
        return xr
    }

    fun unite(x: Int, y: Int) {
        val xr = root(x)
        val yr = root(y)
        if (xr == yr) return

        if (size[xr] >= size[yr]) {
            size[xr] += size[yr]
            parent[yr] = xr
        } else {
            size[yr] += size[xr]
            parent[xr] = yr
        }
    }

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

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