import sys



ris=lambda:list(map(int,next(sys.stdin).split()))



N,M,K=ris()



adj=[set() for _ in range(N)]

for _ in range(M):

    A,B=ris()

    A,B=A-1,B-1

    adj[A].add(B)

    adj[B].add(A)



colors=[-1]*N

ct={}

color=-1

for u in range(N):

    if colors[u]!=-1:

        continue

    color+=1

    colors[u]=color

    stk=[u]

    while stk:

        u=stk.pop()

        ct[color]=ct.get(color,0)+1

        for v in adj[u]:

            if colors[v]==-1:

                colors[v]=color

                stk.append(v)



blk=[{*()} for _ in range(N)]

for _ in range(K):

    A,B=ris()

    A,B=A-1,B-1

    if colors[A]==colors[B]:

        blk[A].add(B)

        blk[B].add(A)



ans=[0]*N

for u in range(N):

    c=colors[u]

    g=len(adj[u])

    b=len(blk[u])

    k=ct[c]-1-g-b

    ans[u]=k



print((*ans))

import sys



rl=lambda:next(sys.stdin)

rfs=lambda:rl().split()

ris=lambda:list(map(int,rfs()))



N,M,K=ris()



adj=[{*()} for _ in range(N)]

for _ in range(M):

    A,B=ris()

    A,B=A-1,B-1

    adj[A].add(B)

    adj[B].add(A)



c=-1

cs=[c]*N

ct={}

for u in range(N):

    if cs[u]!=-1:

        continue

    c+=1

    cs[u]=c

    stk=[u]

    while stk:

        u=stk.pop()

        if c not in ct:

            ct[c]=0

        ct[c]+=1

        for v in adj[u]:

            if cs[v]!=-1:

                continue

            cs[v]=c

            stk.append(v)



ans=[0]*N

for u in range(N):

    g=ct[cs[u]]-1

    f=len(adj[u])

    ans[u]=g-f



for _ in range(K):

    A,B=ris()

    A,B=A-1,B-1

    if cs[A]==cs[B]:

        ans[A]-=1

        ans[B]-=1



print((*ans))

import sys

ris = lambda: list(map(int, next(sys.stdin).split()))
N, M, K = ris()
adj = [set() for _ in range(N)]
for _ in range(M):
    A, B = ris()
    A, B = A - 1, B - 1
    adj[A].add(B)
    adj[B].add(A)
colors = [-1] * N
ct = {}
color = -1
for u in range(N):
    if colors[u] != -1:
        continue
    color += 1
    colors[u] = color
    stk = [u]
    while stk:
        u = stk.pop()
        ct[color] = ct.get(color, 0) + 1
        for v in adj[u]:
            if colors[v] == -1:
                colors[v] = color
                stk.append(v)
blk = [{*()} for _ in range(N)]
for _ in range(K):
    A, B = ris()
    A, B = A - 1, B - 1
    if colors[A] == colors[B]:
        blk[A].add(B)
        blk[B].add(A)
ans = [0] * N
for u in range(N):
    c = colors[u]
    g = len(adj[u])
    b = len(blk[u])
    k = ct[c] - 1 - g - b
    ans[u] = k
print((*ans))

import sys

rl = lambda: next(sys.stdin)
rfs = lambda: rl().split()
ris = lambda: list(map(int, rfs()))
N, M, K = ris()
adj = [{*()} for _ in range(N)]
for _ in range(M):
    A, B = ris()
    A, B = A - 1, B - 1
    adj[A].add(B)
    adj[B].add(A)
c = -1
cs = [c] * N
ct = {}
for u in range(N):
    if cs[u] != -1:
        continue
    c += 1
    cs[u] = c
    stk = [u]
    while stk:
        u = stk.pop()
        if c not in ct:
            ct[c] = 0
        ct[c] += 1
        for v in adj[u]:
            if cs[v] != -1:
                continue
            cs[v] = c
            stk.append(v)
ans = [0] * N
for u in range(N):
    g = ct[cs[u]] - 1
    f = len(adj[u])
    ans[u] = g - f
for _ in range(K):
    A, B = ris()
    A, B = A - 1, B - 1
    if cs[A] == cs[B]:
        ans[A] -= 1
        ans[B] -= 1
print((*ans))

-ris = lambda: list(map(int, next(sys.stdin).split())) +rl = lambda: next(sys.stdin) +rfs = lambda: rl().split() +ris = lambda: list(map(int, rfs())) -adj = [set() for _ in range(N)] +adj = [{*()} for _ in range(N)] -colors = [-1] * N +c = -1 +cs = [c] * N -color = -1 -    if colors[u] != -1: +    if cs[u] != -1: -    color += 1 -    colors[u] = color +    c += 1 +    cs[u] = c -        ct[color] = ct.get(color, 0) + 1 +        if c not in ct: +            ct[c] = 0 +        ct[c] += 1 -            if colors[v] == -1: -                colors[v] = color -                stk.append(v) -blk = [{*()} for _ in range(N)] +            if cs[v] != -1: +                continue +            cs[v] = c +            stk.append(v) +ans = [0] * N +for u in range(N): +    g = ct[cs[u]] - 1 +    f = len(adj[u]) +    ans[u] = g - f -    if colors[A] == colors[B]: -        blk[A].add(B) -        blk[B].add(A) -ans = [0] * N -for u in range(N): -    c = colors[u] -    g = len(adj[u]) -    b = len(blk[u]) -    k = ct[c] - 1 - g - b -    ans[u] = k +    if cs[A] == cs[B]: +        ans[A] -= 1 +        ans[B] -= 1