import queue
import sys 
input=sys.stdin.readline

def main():
    n,m,k=map(int,input().split())
    root={}
    ng={}

    for i in range(n):
        root[i]=[]
        ng[i]=[]
    for i in range(m):
        a,b=map(int,input().split())
        root[a-1].append(b-1)
        root[b-1].append(a-1)
        ng[a-1].append(b-1)
        ng[b-1].append(a-1)
    for i in range(k):
        a,b=map(int,input().split())
        ng[a-1].append(b-1)
        ng[b-1].append(a-1)
    
    Vstd=tuple([])
    checkVst=[False]*n
    num=[0]*n
    ToVst=queue.Queue()
    for i in range(n):
        if checkVst[i]:
            continue
        Vstd=[]
        now=i
        Vstd.append(now)
        checkVst[now]=True

        for kouho in root[now]:
            if checkVst[kouho]:
                continue
            ToVst.put(kouho)
            checkVst[kouho]=True

        while ToVst.empty()==False:
            now=ToVst.get()
            Vstd.append(now)
            checkVst[now]=True
           
            for kouho in root[now]:
                if checkVst[kouho]:
                    continue
                ToVst.put(kouho)
                checkVst[kouho]=True
                
        lengh=len(Vstd)
        for v in Vstd:
            num[v]=lengh-1
            num[v]-=len(set(ng[v])&set(Vstd))
    print(*num)
    #print(" ".join(map(str,num)))
   

if __name__=="__main__":
    main()
    
        