r=lambda x:p[x]>=0and r(p[x])or x

(n,m,k),*t=[list(map(int,t.split()))for t in open(0)]

p,s=[-1]*-~n,[-1]*-~n

for i,(a,b)in enumerate(t):

  x,y=r(a),r(b)

  if(x!=y)*m>i:

    if x>y:x,y=y,x

    p[x]+=p[y]

    p[y]=x

  if r(a)==r(b)or i<m:

    s[a]-=1

    s[b]-=1

for i in range(n+1):s[i]-=p[r(i)]

print((*s[1:]))
r=lambda x:p[x]>=0and r(p[x])or x

(n,m,k),*t=[list(map(int,t.split()))for t in open(0)]

p,s=[-1]*-~n,[-1]*-~n

for i,(a,b)in enumerate(t):

  x,y=r(a),r(b)

  if(x!=y)*m>i:

    if x>y:x,y=y,x

    p[x]+=p[y]

    p[y]=x

  if x==y or i<m:

    s[a]-=1

    s[b]-=1

for i in range(n+1):s[i]-=p[r(i)]

print((*s[1:]))
r = lambda x: p[x] >= 0 and r(p[x]) or x
(n, m, k), *t = [list(map(int, t.split())) for t in open(0)]
p, s = [-1] * -~n, [-1] * -~n
for i, (a, b) in enumerate(t):
    x, y = r(a), r(b)
    if (x != y) * m > i:
        if x > y:
            x, y = y, x
        p[x] += p[y]
        p[y] = x
    if r(a) == r(b) or i < m:
        s[a] -= 1
        s[b] -= 1
for i in range(n + 1):
    s[i] -= p[r(i)]
print((*s[1:]))

r = lambda x: p[x] >= 0 and r(p[x]) or x
(n, m, k), *t = [list(map(int, t.split())) for t in open(0)]
p, s = [-1] * -~n, [-1] * -~n
for i, (a, b) in enumerate(t):
    x, y = r(a), r(b)
    if (x != y) * m > i:
        if x > y:
            x, y = y, x
        p[x] += p[y]
        p[y] = x
    if x == y or i < m:
        s[a] -= 1
        s[b] -= 1
for i in range(n + 1):
    s[i] -= p[r(i)]
print((*s[1:]))

-    if r(a) == r(b) or i < m: +    if x == y or i < m: