### BUGGY CODE ###

# -*- coding: utf-8 -*-
"""
Created on Mon Mar  2 06:12:32 2020

@author: naoki
"""
from collections import deque
import sys
# =============================================================================
# with open('C:/Users/naoki/Desktop/Atcoder/input.txt') as f:
#     N ,M ,K = map(int,f.readline().split())
#     A = [list(map(int,f.readline().split())) for _ in range(M)]
#     C = [list(map(int,f.readline().split())) for _ in range(K)]
# =============================================================================
input = sys.stdin.readline
N ,M ,K = map(int,input().split())
A = [list(map(int,input().split())) for _ in range(M)]
C = [list(map(int,input().split())) for _ in range(K)]
connection = {i:[] for i in range(1,N+1)}
seen = {i:False for i in range(1,N+1)}
label = {i:0 for i in range(1,N+1)}
todo = deque()
All = 0
num = 0

for pair in A:
    connection[pair[0]].append(pair[1])
    connection[pair[1]].append(pair[0])
    

while False in seen.values():
    num+=1
    H = [k for k,v in seen.items() if v == False][0]
    todo.append(H)
    seen[H] = True
    group = set()
    while len(todo) > 0:
        current = todo.pop()
        label[current] = num
        group.add(current)
        for i in connection[current]:
            if seen[i] == False:
                todo.append(i)
                seen[i] = True
                
    #print(group)
minus = {i:0 for i in range(1,N+1)}
for pair in A:
    minus[pair[0]] -= 1
    minus[pair[1]] -= 1
for pair in C:
    if label[pair[0]] == label[pair[1]]:
        minus[pair[0]] -= 1
        minus[pair[1]] -= 1
accompany = {i:0 for i in range(1,num+1)}
for i in range(1,N+1):
    accompany[label[i]] += 1

for i in range(1,N+1):
    print(accompany[label[i]] + minus[i]-1)
    

# =============================================================================
# A = {5:[5,4],4:[2,3]}
# A[5].append(6)
# del A[5][0]
# =============================================================================

# =============================================================================
#     block = 0
#     for block in C:
#         if block[0] in group and block in group:
#             cone_num -= 2
# =============================================================================
    

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Mon Mar  2 06:12:32 2020

@author: naoki
"""
from collections import deque
import time
start = time.time()
time_all = []
part_time1 = 0
part_time2 = 0
#with open('C:/Users/naoki/Desktop/Atcoder/input.txt') as f:
#    N ,M ,K = map(int,f.readline().split())
#    A = [list(map(int,f.readline().split())) for _ in range(M)]
#    C = [list(map(int,f.readline().split())) for _ in range(K)]
    
time_all.append(time.time()-start)

N ,M ,K = map(int,input().split())
A = [list(map(int,input().split())) for _ in range(M)]
C = [list(map(int,input().split())) for _ in range(K)]
connection = [[] for i in range(N)]
seen = [False]*N
label = [0]*N
todo = deque()
num = 0
minus = [0]*N

time_all.append(time.time()-start)
 
for pair in A:
    connection[pair[0]-1] += [(pair[1]-1)]
    connection[pair[1]-1] += [(pair[0]-1)]
    minus[pair[0]-1] -= 1
    minus[pair[1]-1] -= 1

time_all.append(time.time()-start)
count = 0
for k in range(N):
    time1 = time.time()
    num+=1
    if seen[k] == False:
        H = k
    else:
        continue
    todo += [(H)]
    seen[H] = True
    group = []
    part_time1 += time.time() - time1
    while not len(todo) == 0:
        current = todo.pop()
        label[current] = num
        group += [current]
        for i in connection[current]:
            count+=1
            if seen[i] == False:
                todo += [i]
                seen[i] = True
#print(count)
time_all.append(time.time()-start)

for pair in C:
    if label[pair[0]-1] == label[pair[1]-1]:
        minus[pair[0]-1] -= 1
        minus[pair[1]-1] -= 1
accompany = {i:0 for i in range(1,num+1)}
for i in range(N):
    accompany[label[i]] += 1
    
time_all.append(time.time()-start)

print(" ".join(map(lambda x,y : str(accompany[x]+y-1), label, minus)))

time_all.append(time.time()-start)

#print(time_all)