f=lambda:list(map(int,input().split()))

def r(x):

  while p[x]>=0: x=p[x]

  return x

def u(x,y):

  x,y=r(x),r(y)

  if x==y: return

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

  p[x]+=p[y]; p[y]=x

n,m,k=f()

l,p=[0]*-~n,[-1]*-~n

for _ in range(m):

  a,b=f()

  u(a,b); l[a]-=1; l[b]-=1

for _ in range(k):

  c,d=f()

  if r(c)==r(d): l[c]-=1; l[d]-=1

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

print((*l[1:]))
f=lambda:list(map(int,input().split()))

n,m,k=f()



# Union_Find

p=[-1]*n

def root(x):

  while p[x]>=0: x=p[x]

  return x

def unite(x,y):

  x,y=root(x),root(y)

  if x==y: return

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

  p[x]+=p[y]

  p[y]=x

def same(x,y):

  return root(x)==root(y)

def size(x):

  return -p[root(x)]



l=[-1]*n

for _ in range(m):

  a,b=f()

  unite(a-1,b-1)

  l[a-1]-=1

  l[b-1]-=1

for i in range(n):

  l[i]+=size(i)

for _ in range(k):

  c,d=f()

  if same(c-1,d-1):

    l[c-1]-=1

    l[d-1]-=1

print((*l))
f = lambda: list(map(int, input().split()))


def r(x):
    while p[x] >= 0:
        x = p[x]
    return x


def u(x, y):
    x, y = r(x), r(y)
    if x == y:
        return
    if x > y:
        x, y = y, x
    p[x] += p[y]
    p[y] = x


n, m, k = f()
l, p = [0] * -~n, [-1] * -~n
for _ in range(m):
    a, b = f()
    u(a, b)
    l[a] -= 1
    l[b] -= 1
for _ in range(k):
    c, d = f()
    if r(c) == r(d):
        l[c] -= 1
        l[d] -= 1
for i in range(n + 1):
    l[i] -= p[r(i)] + 1
print((*l[1:]))

f = lambda: list(map(int, input().split()))
n, m, k = f()
# Union_Find
p = [-1] * n


def root(x):
    while p[x] >= 0:
        x = p[x]
    return x


def unite(x, y):
    x, y = root(x), root(y)
    if x == y:
        return
    if x > y:
        x, y = y, x
    p[x] += p[y]
    p[y] = x


def same(x, y):
    return root(x) == root(y)


def size(x):
    return -p[root(x)]


l = [-1] * n
for _ in range(m):
    a, b = f()
    unite(a - 1, b - 1)
    l[a - 1] -= 1
    l[b - 1] -= 1
for i in range(n):
    l[i] += size(i)
for _ in range(k):
    c, d = f()
    if same(c - 1, d - 1):
        l[c - 1] -= 1
        l[d - 1] -= 1
print((*l))

+n, m, k = f() +# Union_Find +p = [-1] * n -def r(x): +def root(x): -def u(x, y): -    x, y = r(x), r(y) +def unite(x, y): +    x, y = root(x), root(y) -n, m, k = f() -l, p = [0] * -~n, [-1] * -~n +def same(x, y): +    return root(x) == root(y) + + +def size(x): +    return -p[root(x)] + + +l = [-1] * n -    u(a, b) -    l[a] -= 1 -    l[b] -= 1 +    unite(a - 1, b - 1) +    l[a - 1] -= 1 +    l[b - 1] -= 1 +for i in range(n): +    l[i] += size(i) -    if r(c) == r(d): -        l[c] -= 1 -        l[d] -= 1 -for i in range(n + 1): -    l[i] -= p[r(i)] + 1 -print((*l[1:])) +    if same(c - 1, d - 1): +        l[c - 1] -= 1 +        l[d - 1] -= 1 +print((*l))