class Union:

  def __init__(s, num):

    s.T = [-1 for i in range(num)]

 

  def root(s, x):

    if s.T[x] < 0: return x, -s.T[x]

    t, k = s.root(s.T[x])

    s.T[x] = t

    return t, k

 

  def merge(s, x, y):

    an, am = s.root(x)

    bn, bm = s.root(y)

    if an == bn: return False

    if am < bm: an, bn  = bn, an

    s.T[an] += s.T[bn]

    s.T[bn] = an

    return True

 

  def size(s, x):

    return s.root(x)[1]



  def same(s, x, y):

    return s.root(x)[0] == s.root(y)[0]



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

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

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

 

uni = Union(N)

ans = [-1] * N

for a, b in AB:

  a -= 1

  b -= 1

  uni.merge(a, b)

  ans[a] -= 1

  ans[b] -= 1

 

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

for c, d in CD:

  c -= 1

  d -= 1

  L[c].append(d)

  L[d].append(c)

 

for i in range(N):

  ans[i] += uni.size(i)

  for j in L[i]:

    if uni.same(i, j):

      ans[i] -= 1

 

ans = list(map(str, ans))

print((" ".join(ans)))
class Union:

  def __init__(s, num):

    s.T = [-1 for i in range(num)]

 

  def root(s, x):

    if s.T[x] < 0: return x, -s.T[x]

    t, k = s.root(s.T[x])

    s.T[x] = t

    return t, k

 

  def merge(s, x, y):

    an, am = s.root(x)

    bn, bm = s.root(y)

    if an == bn: return False

    if am < bm: an, bn  = bn, an

    s.T[an] += s.T[bn]

    s.T[bn] = an

    return True

 

  def size(s, x):

    return s.root(x)[1]



  def same(s, x, y):

    return s.root(x)[0] == s.root(y)[0]



import sys

input = sys.stdin.readline



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

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

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

 

uni = Union(N)

ans = [-1] * N

for a, b in AB:

  a -= 1

  b -= 1

  uni.merge(a, b)

  ans[a] -= 1

  ans[b] -= 1

 

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

for c, d in CD:

  c -= 1

  d -= 1

  L[c].append(d)

  L[d].append(c)

 

for i in range(N):

  ans[i] += uni.size(i)

  for j in L[i]:

    if uni.same(i, j):

      ans[i] -= 1

 

ans = list(map(str, ans))

print((" ".join(ans)))
class Union:
    def __init__(s, num):
        s.T = [-1 for i in range(num)]

    def root(s, x):
        if s.T[x] < 0:
            return x, -s.T[x]
        t, k = s.root(s.T[x])
        s.T[x] = t
        return t, k

    def merge(s, x, y):
        an, am = s.root(x)
        bn, bm = s.root(y)
        if an == bn:
            return False
        if am < bm:
            an, bn = bn, an
        s.T[an] += s.T[bn]
        s.T[bn] = an
        return True

    def size(s, x):
        return s.root(x)[1]

    def same(s, x, y):
        return s.root(x)[0] == s.root(y)[0]


N, M, K = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]
CD = [list(map(int, input().split())) for _ in range(K)]
uni = Union(N)
ans = [-1] * N
for a, b in AB:
    a -= 1
    b -= 1
    uni.merge(a, b)
    ans[a] -= 1
    ans[b] -= 1
L = [[] for _ in range(N)]
for c, d in CD:
    c -= 1
    d -= 1
    L[c].append(d)
    L[d].append(c)
for i in range(N):
    ans[i] += uni.size(i)
    for j in L[i]:
        if uni.same(i, j):
            ans[i] -= 1
ans = list(map(str, ans))
print((" ".join(ans)))

class Union:
    def __init__(s, num):
        s.T = [-1 for i in range(num)]

    def root(s, x):
        if s.T[x] < 0:
            return x, -s.T[x]
        t, k = s.root(s.T[x])
        s.T[x] = t
        return t, k

    def merge(s, x, y):
        an, am = s.root(x)
        bn, bm = s.root(y)
        if an == bn:
            return False
        if am < bm:
            an, bn = bn, an
        s.T[an] += s.T[bn]
        s.T[bn] = an
        return True

    def size(s, x):
        return s.root(x)[1]

    def same(s, x, y):
        return s.root(x)[0] == s.root(y)[0]


import sys

input = sys.stdin.readline
N, M, K = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]
CD = [list(map(int, input().split())) for _ in range(K)]
uni = Union(N)
ans = [-1] * N
for a, b in AB:
    a -= 1
    b -= 1
    uni.merge(a, b)
    ans[a] -= 1
    ans[b] -= 1
L = [[] for _ in range(N)]
for c, d in CD:
    c -= 1
    d -= 1
    L[c].append(d)
    L[d].append(c)
for i in range(N):
    ans[i] += uni.size(i)
    for j in L[i]:
        if uni.same(i, j):
            ans[i] -= 1
ans = list(map(str, ans))
print((" ".join(ans)))

+import sys + +input = sys.stdin.readline