#01:55

#UnionFind最適化に向けた実験

n,m,k = list(map(int,input().split()))

cnt = [1 for _ in range(n)]

pre = [i for i in range(n)]

num = [1 for _ in range(n)]

for _ in range(m):

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

  a -= 1

  b -= 1

  num[a] += 1

  num[b] += 1

  A = []

  B = []

  while a != pre[a]:

    a = pre[a]

    A.append(a)

  while b != pre[b]:

    b = pre[b]

    B.append(b)

  if a != b:

    if cnt[a] >= cnt[b]:

      pre[b] = a

      for aa in A:

        pre[aa] = a

      for bb in B:

        pre[bb] = a

      cnt[a] += cnt[b]

      cnt[b] = 0

    else:

      pre[a] = b

      for aa in A:

        pre[aa] = b

      for bb in B:

        pre[bb] = b

      cnt[b] += cnt[a]

      cnt[a] = 0

#print(pre)

#print(cnt)

root = []

ans = []

for i in range(n):

  I = int(i)

  while I != pre[I]:

    I = pre[I]

  root.append(I)

  ans.append(cnt[I]-num[i])

#print(root)

#print(ans)

for _ in range(k):

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

  a -= 1

  b -= 1

  if root[a] == root[b]:

    ans[a] -= 1

    ans[b] -= 1

print((' '.join(map(str,ans))))
#02:08

#BFS

n,m,k = list(map(int,input().split()))

peer = [[] for _ in range(n)]

num = [1 for _ in range(n)]

for _ in range(m):

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

  a -= 1

  b -= 1

  num[a] += 1

  num[b] += 1

  peer[a].append(b)

  peer[b].append(a)

seen = [0 for _ in range(n)]

root = [i for i in range(n)]

cnt = [0 for _ in range(n)]

for i in range(n):

  if seen[i] == 1:

    continue

  seen[i] = 1

  now = [i]

  tmp = 1

  while now:

    last = now

    now = []

    for x in last:

      for y in peer[x]:

        if seen[y] == 0:

          seen[y] = 1

          now.append(y)

          root[y] = i

          tmp += 1

  cnt[i] = tmp

#print(root)

#print(cnt)

for i in range(n):

  cnt[i] = cnt[root[i]]

#print(cnt)

for i in range(n):

  cnt[i] -= num[i]

#print(cnt)

for _ in range(k):

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

  a -= 1

  b -= 1

  if root[a] == root[b]:

    cnt[a] -= 1

    cnt[b] -= 1

print((' '.join(map(str,cnt))))
# 01:55
# UnionFind最適化に向けた実験
n, m, k = list(map(int, input().split()))
cnt = [1 for _ in range(n)]
pre = [i for i in range(n)]
num = [1 for _ in range(n)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    num[a] += 1
    num[b] += 1
    A = []
    B = []
    while a != pre[a]:
        a = pre[a]
        A.append(a)
    while b != pre[b]:
        b = pre[b]
        B.append(b)
    if a != b:
        if cnt[a] >= cnt[b]:
            pre[b] = a
            for aa in A:
                pre[aa] = a
            for bb in B:
                pre[bb] = a
            cnt[a] += cnt[b]
            cnt[b] = 0
        else:
            pre[a] = b
            for aa in A:
                pre[aa] = b
            for bb in B:
                pre[bb] = b
            cnt[b] += cnt[a]
            cnt[a] = 0
# print(pre)
# print(cnt)
root = []
ans = []
for i in range(n):
    I = int(i)
    while I != pre[I]:
        I = pre[I]
    root.append(I)
    ans.append(cnt[I] - num[i])
# print(root)
# print(ans)
for _ in range(k):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    if root[a] == root[b]:
        ans[a] -= 1
        ans[b] -= 1
print((" ".join(map(str, ans))))

# 02:08
# BFS
n, m, k = list(map(int, input().split()))
peer = [[] for _ in range(n)]
num = [1 for _ in range(n)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    num[a] += 1
    num[b] += 1
    peer[a].append(b)
    peer[b].append(a)
seen = [0 for _ in range(n)]
root = [i for i in range(n)]
cnt = [0 for _ in range(n)]
for i in range(n):
    if seen[i] == 1:
        continue
    seen[i] = 1
    now = [i]
    tmp = 1
    while now:
        last = now
        now = []
        for x in last:
            for y in peer[x]:
                if seen[y] == 0:
                    seen[y] = 1
                    now.append(y)
                    root[y] = i
                    tmp += 1
    cnt[i] = tmp
# print(root)
# print(cnt)
for i in range(n):
    cnt[i] = cnt[root[i]]
# print(cnt)
for i in range(n):
    cnt[i] -= num[i]
# print(cnt)
for _ in range(k):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    if root[a] == root[b]:
        cnt[a] -= 1
        cnt[b] -= 1
print((" ".join(map(str, cnt))))

-# 01:55 -# UnionFind最適化に向けた実験 +# 02:08 +# BFS -cnt = [1 for _ in range(n)] -pre = [i for i in range(n)] +peer = [[] for _ in range(n)] -    A = [] -    B = [] -    while a != pre[a]: -        a = pre[a] -        A.append(a) -    while b != pre[b]: -        b = pre[b] -        B.append(b) -    if a != b: -        if cnt[a] >= cnt[b]: -            pre[b] = a -            for aa in A: -                pre[aa] = a -            for bb in B: -                pre[bb] = a -            cnt[a] += cnt[b] -            cnt[b] = 0 -        else: -            pre[a] = b -            for aa in A: -                pre[aa] = b -            for bb in B: -                pre[bb] = b -            cnt[b] += cnt[a] -            cnt[a] = 0 -# print(pre) +    peer[a].append(b) +    peer[b].append(a) +seen = [0 for _ in range(n)] +root = [i for i in range(n)] +cnt = [0 for _ in range(n)] +for i in range(n): +    if seen[i] == 1: +        continue +    seen[i] = 1 +    now = [i] +    tmp = 1 +    while now: +        last = now +        now = [] +        for x in last: +            for y in peer[x]: +                if seen[y] == 0: +                    seen[y] = 1 +                    now.append(y) +                    root[y] = i +                    tmp += 1 +    cnt[i] = tmp +# print(root) -root = [] -ans = [] -    I = int(i) -    while I != pre[I]: -        I = pre[I] -    root.append(I) -    ans.append(cnt[I] - num[i]) -# print(root) -# print(ans) +    cnt[i] = cnt[root[i]] +# print(cnt) +for i in range(n): +    cnt[i] -= num[i] +# print(cnt) -        ans[a] -= 1 -        ans[b] -= 1 -print((" ".join(map(str, ans)))) +        cnt[a] -= 1 +        cnt[b] -= 1 +print((" ".join(map(str, cnt))))