#あっとのTECH LOG、ここからDFS

N, M, K = map(int, input().split())

F = [[] for _ in range(N)]

B = [[] for _ in range(N)]



for _ in range(M):

    a, b = map(int, input().split())

    a, b = a - 1, b - 1

    F[a].append(b)

    F[b].append(a)



for _ in range(K):

    c, d = map(int, input().split())

    c, d = c - 1, d - 1

    B[c].append(d)

    B[d].append(c)





D = {}

parent = [-1] * N

visited = [False] * N

for root in range(N):

    if visited[root]:

        continue



    D[root] = set([root])

    stack = [root]

    while stack:

        n = stack.pop()

        visited[n] = True

        parent[n] = root



        for to in F[n]:

            if visited[to]:

                continue

            D[root].add(to)

            stack.append(to)



ans = [0] * N

for iam in range(N):

    group = D[parent[iam]]

    tmp_ans = len(group) - len(F[iam]) - 1

    for block in B[iam]:

        if block in group:

            tmp_ans -= 1

    ans[iam] = tmp_ans



print(*ans, sep=' ')

#@YottyPG　Qiita

from collections import deque



N,M,K = list(map(int,input().split()))

friend = [list(map(int,input().split())) for _ in range(M)]

block = [list(map(int,input().split())) for _ in range(K)]



f = [set() for _ in range(N+1)]

b = [set() for _ in range(N+1)]



for i,j in friend:

    f[i].add(j)

    f[j].add(i)

for i,j in block:

    b[i].add(j)

    b[j].add(i)



stack=deque()

ans = [0]*(N+1)

visited = [0]*(N+1)



for i in range(1,N+1):

    if visited[i]:

        continue

    link = {i}

    visited[i] = 1 

    stack.append(i)

    while stack:

        n = stack.pop()

        for j in f[n]:

            if visited[j]==0:

                stack.append(j)

                visited[j] = 1

                link.add(j)

    for i in link:

        ans[i] = len(link) - len(link & f[i]) - len(link & b[i]) - 1

print((*ans[1:]))
# あっとのTECH LOG、ここからDFS
N, M, K = map(int, input().split())
F = [[] for _ in range(N)]
B = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    F[a].append(b)
    F[b].append(a)
for _ in range(K):
    c, d = map(int, input().split())
    c, d = c - 1, d - 1
    B[c].append(d)
    B[d].append(c)
D = {}
parent = [-1] * N
visited = [False] * N
for root in range(N):
    if visited[root]:
        continue
    D[root] = set([root])
    stack = [root]
    while stack:
        n = stack.pop()
        visited[n] = True
        parent[n] = root
        for to in F[n]:
            if visited[to]:
                continue
            D[root].add(to)
            stack.append(to)
ans = [0] * N
for iam in range(N):
    group = D[parent[iam]]
    tmp_ans = len(group) - len(F[iam]) - 1
    for block in B[iam]:
        if block in group:
            tmp_ans -= 1
    ans[iam] = tmp_ans
print(*ans, sep=" ")

# @YottyPG　Qiita
from collections import deque

N, M, K = list(map(int, input().split()))
friend = [list(map(int, input().split())) for _ in range(M)]
block = [list(map(int, input().split())) for _ in range(K)]
f = [set() for _ in range(N + 1)]
b = [set() for _ in range(N + 1)]
for i, j in friend:
    f[i].add(j)
    f[j].add(i)
for i, j in block:
    b[i].add(j)
    b[j].add(i)
stack = deque()
ans = [0] * (N + 1)
visited = [0] * (N + 1)
for i in range(1, N + 1):
    if visited[i]:
        continue
    link = {i}
    visited[i] = 1
    stack.append(i)
    while stack:
        n = stack.pop()
        for j in f[n]:
            if visited[j] == 0:
                stack.append(j)
                visited[j] = 1
                link.add(j)
    for i in link:
        ans[i] = len(link) - len(link & f[i]) - len(link & b[i]) - 1
print((*ans[1:]))

-# あっとのTECH LOG、ここからDFS -N, M, K = map(int, input().split()) -F = [[] for _ in range(N)] -B = [[] for _ in range(N)] -for _ in range(M): -    a, b = map(int, input().split()) -    a, b = a - 1, b - 1 -    F[a].append(b) -    F[b].append(a) -for _ in range(K): -    c, d = map(int, input().split()) -    c, d = c - 1, d - 1 -    B[c].append(d) -    B[d].append(c) -D = {} -parent = [-1] * N -visited = [False] * N -for root in range(N): -    if visited[root]: +# @YottyPG　Qiita +from collections import deque + +N, M, K = list(map(int, input().split())) +friend = [list(map(int, input().split())) for _ in range(M)] +block = [list(map(int, input().split())) for _ in range(K)] +f = [set() for _ in range(N + 1)] +b = [set() for _ in range(N + 1)] +for i, j in friend: +    f[i].add(j) +    f[j].add(i) +for i, j in block: +    b[i].add(j) +    b[j].add(i) +stack = deque() +ans = [0] * (N + 1) +visited = [0] * (N + 1) +for i in range(1, N + 1): +    if visited[i]: -    D[root] = set([root]) -    stack = [root] +    link = {i} +    visited[i] = 1 +    stack.append(i) -        visited[n] = True -        parent[n] = root -        for to in F[n]: -            if visited[to]: -                continue -            D[root].add(to) -            stack.append(to) -ans = [0] * N -for iam in range(N): -    group = D[parent[iam]] -    tmp_ans = len(group) - len(F[iam]) - 1 -    for block in B[iam]: -        if block in group: -            tmp_ans -= 1 -    ans[iam] = tmp_ans -print(*ans, sep=" ") +        for j in f[n]: +            if visited[j] == 0: +                stack.append(j) +                visited[j] = 1 +                link.add(j) +    for i in link: +        ans[i] = len(link) - len(link & f[i]) - len(link & b[i]) - 1 +print((*ans[1:]))