fun main(args : Array<String>) {
    var (N,M,K)= ReadInts()
    var tree = UFtree(N)
    var frendscount = (1..N).map{0}.toMutableList()
    for(i in 1..M){
        var (X,Y)= ReadInts()
        tree.unite(X-1, Y-1)
        frendscount[X-1]+=1
        frendscount[Y-1]+=1
    }
    
    for(i in 0..(N-1)){
        tree.find(i)
        frendscount[i]+=1
    }
    for(i in 1..K){
        var (X,Y)=ReadInts()
        var XX=tree.find(X-1)
        var YY=tree.find(Y-1)
        if(XX==YY){
            frendscount[X-1]+=1
            frendscount[Y-1]+=1
        }
    }
    var dic = mutableMapOf<Int,Int>()
    for(i in 0..(N-1)){
        var root= tree.find(i)
        if(!dic.containsKey(root)){
            dic[root]=0
        }
        dic[root] = dic[root]!! + 1
    }
    println( (0..(N-1)).map{dic[tree.find(it)]!!-frendscount[it]}.joinToString(separator=" "))




}


class UFtree(size : Int){
    var root = (1..size).map{-1}.toMutableList()
    var rank = (1..size).map{0}.toMutableList()
    fun find(X: Int):Int{
        if(root[X]<0){
            return X
        }
        var newX=find(root[X])
        root[X]=newX
        return newX
    }
    fun unite(X:Int,Y:Int){
        var XX=find(X)
        var YY=find(Y)

        if(XX==YY){
            return
        }

        if(rank[XX]>rank[YY]){
            root[XX]+=root[YY]
            root[YY]=XX
        }else{
            if(rank[YY]==rank[XX]){
                rank[YY]+=1
            }
            root[YY]+=root[XX]
            root[XX]=YY
        }
    }
}



fun ReadInts():MutableList<Int>{
    return readLine()!!.split(" ").map{it.toInt()}.toMutableList()
}

fun ReadLongs():MutableList<Long>{
    return readLine()!!.split(" ").map{it.toLong()}.toMutableList()
}
fun ReadDoubles():MutableList<Double>{
    return readLine()!!.split(" ").map{it.toDouble()}.toMutableList()
}
fun input() : String{
    return readLine()!!

}