import sys
sys.setrecursionlimit(2147483647)
input = sys.stdin.readline
N, M, K = map(int, input().split())
graph = [[] for _ in range(N)]
block = [[] for _ in range(N)]
connected_components = []
count = 0
counts = [0 for _ in range(N)]
seen = [False for _ in range(N)]
def dfs(v, c, seen, origin):
    global count
    seen[v] = True
    for node in graph[v]:
        if seen[node] == True:
            continue
        if node not in block[origin]:
            count += 1
        dfs(node, c+1, seen, origin)
def dfs_connected(v, order):
    seen[v] = True
    connected_components[order].append(v)
    for node in graph[v]:
        if seen[node] == True:
            continue
        dfs_connected(node, order)
 
for Mi in range(M):
    a, b = map(int, input().split())
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)
 
for Ki in range(K):
    a, b = map(int, input().split())
    block[a-1].append(b-1)
    block[b-1].append(a-1)
 
for v in range(N):
    if seen[v] == True:
        continue
    connected_components.append([])
    dfs_connected(v, v)
 
for components in connected_components:
    for component in components:
        seen = [False for _ in range(N)]
        count = 0
        dfs(component, count, seen, component)
        counts[component] = count-len(graph[component])
 
print(' '.join(map(str, counts)))