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=[-1]*-~n

s=p[:]

for a,b in t:

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

 if(x!=y)*m>0:p[x]+=p[y];p[y]=y=x

 if x==y:s[a]-=1;s[b]-=1

 m-=1

print((*[s[i+1]-p[r(i+1)]for i in range(n)]))
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=[-1]*-~n

s=p[:]

for a,b in t:

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

 if(x!=y)*m>0:p[x]+=p[y];p[y]=y=x

 if x==y:s[a]-=1;s[b]-=1;m-=1

print((*[s[i+1]-p[r(i+1)]for i in range(n)]))
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 = [-1] * -~n
s = p[:]
for a, b in t:
    x, y = sorted((r(a), r(b)))
    if (x != y) * m > 0:
        p[x] += p[y]
        p[y] = y = x
    if x == y:
        s[a] -= 1
        s[b] -= 1
    m -= 1
print((*[s[i + 1] - p[r(i + 1)] for i in range(n)]))

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 = [-1] * -~n
s = p[:]
for a, b in t:
    x, y = sorted((r(a), r(b)))
    if (x != y) * m > 0:
        p[x] += p[y]
        p[y] = y = x
    if x == y:
        s[a] -= 1
        s[b] -= 1
        m -= 1
print((*[s[i + 1] - p[r(i + 1)] for i in range(n)]))

-    m -= 1 +        m -= 1