import sys

sys.setrecursionlimit(10 ** 6)

def friends(friend, array, i, label, t):
    for j in range(len(friend[i])):
        if label[friend[i][j] - 1] == 0:
            label[friend[i][j] - 1] = label[i]
            array.append(friend[i][j] - 1)
            return friends(friend, array, friend[i][j] - 1, label, t + 1)
    
    if t != 1:
        array.pop(-1)
        return friends(friend, array, array[t - 1], label, t - 1)
    else:
        return label   
        
n, m, k = map(int, input().split())
a = [0] * m
b = [0] * m
c = [0] * k
d = [0] * k

label = [0] * n
kosu_label = 1

block = [0] * n

ans = [0] * n

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

for i in range(n):
    if label[i] == 0:
        label[i] = kosu_label
        label = friends(friend, [-1, i], i, label, 1)
            
    kosu_label = kosu_label + 1

label_s = [0] * kosu_label

for i in range(n):
    label_s[label[i]] = label_s[label[i]] + 1
    
for w in range(k):
    if label[c[w] - 1] == label[d[w] - 1]:
        block[c[w] - 1] = block[c[w] - 1] + 1
        block[d[w] - 1] = block[d[w] - 1] + 1
            
for i in range(n):
    ans[i] = label_s[label[i]] - len(friend[i]) - block[i] - 1
    print(ans[i], end = ' ')