import java.io.PrintWriter

fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextList() = next().split(" ")
fun nextIntList() = nextList().map(String::toInt)
fun nextLongList() = nextList().map(String::toLong)
fun nextDoubleList() = nextList().map(String::toDouble)

val pw = PrintWriter(System.out)
fun print(s: Any = "") = pw.print(s)
fun println(s: Any = "") = pw.println(s)

fun <T> Iterable<T>.join(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "") = joinToString(separator, prefix, postfix)
fun <T> Array<T>.join(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "") = joinToString(separator, prefix, postfix)

fun main(args: Array<String>) {
    main()
    pw.flush()
}

fun main() {
    val (N, M, K) = nextIntList()
    val UF = UnionFind(N)
    val G = IntArray(N + 1) { 0 }
    repeat(M) {
        val (a, b) = nextIntList()
        UF.union(a, b)
        G[a]++
        G[b]++
    }
    val answers = IntArray(N + 1)
    for (i in 1..N) {
        answers[i] = UF.sizeOf(i) - G[i] - 1
    }
    repeat(K) {
        val (c, d) = nextIntList()
        if (UF.same(c, d)) {
            answers[c]--
            answers[d]--
        }
    }
    println(answers.drop(1).joinToString(" "))
}

class UnionFind(n: Int) {
    private val roots = Array(n + 1) { Root(it) }

    tailrec fun find(x: Int): Root {
        if (roots[x].root == x) {
            return roots[x]
        }
        roots[x].root = roots[roots[x].root].root
        return find(roots[x].root)
    }

    fun union(x: Int, y: Int) {
        val rx = find(x)
        val ry = find(y)
        if (rx.root == ry.root) return
        if (rx.size < ry.size) {
            rx.root = ry.root
            ry.size += rx.size
        } else {
            ry.root = rx.root
            rx.size += ry.size
        }
    }

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

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

    data class Root(var root: Int, var size: Int = 1)
}