import queue
q = queue.Queue()

n, m, k = map(int, input().split())

friend = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    friend[a-1].append(b-1)
    friend[b-1].append(a-1)

block = [[] for _ in range(n)]
for _ in range(k):
    c, d = map(int, input().split())
    block[c-1].append(d-1)
    block[d-1].append(c-1)
    
#print(friend)
#print(block)
c_list = []
for i in range(n):
    counter = 0
    seen = [i]
    for j in friend[i]:
        q.put(j)
        seen.append(j)
    while q.qsize() != 0:
        x = q.get()
        for k in friend[x]:
            if not k in seen and not k in block[i]:
                q.put(k)
                seen.append(k)
                counter += 1
    c_list.append(counter)
    
print(c_list)