

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



p=[i for i in range(N)]

r=[0]*N



def find(x):

  if p[x]==x:

    return x

  else:

    p[x]=find(p[x])

    return p[x]



def unite(x,y):

  x=find(x)

  y=find(y)

  if x==y:

    return

  if r[x]<r[y]:

    p[x]=y

  else:

    p[y]=x

    if r[x]==r[y]:

      r[x]+=1



nc=[1]*N

f=[0]*N



for i in range(M):

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

  nc[a-1]+=1

  nc[b-1]+=1

  unite(a-1,b-1)



for i in range(K):

  c,d=list(map(int,input().split()))

  if find(c-1)==find(d-1):

    nc[c-1]+=1

    nc[d-1]+=1



for i in range(N):

  f[find(i)]+=1



print((*[f[find(i)]-nc[i] for i in range(N)]))

import sys

input=sys.stdin.readline



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



p=list(range(N))

r=[0]*N



def find(x):

  if p[x]==x:

    return x

  else:

    p[x]=find(p[x])

    return p[x]



def unite(x,y):

  x=find(x)

  y=find(y)

  if x==y:

    return

  if r[x]<r[y]:

    p[x]=y

  else:

    p[y]=x

    if r[x]==r[y]:

      r[x]+=1



nc=[1]*N

f=[0]*N



for i in range(M):

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

  nc[a-1]+=1

  nc[b-1]+=1

  unite(a-1,b-1)



for i in range(K):

  c,d=list(map(int,input().split()))

  if find(c-1)==find(d-1):

    nc[c-1]+=1

    nc[d-1]+=1



for i in range(N):

  f[find(i)]+=1



print((*[f[find(i)]-nc[i] for i in range(N)]))

N, M, K = list(map(int, input().split()))
p = [i for i in range(N)]
r = [0] * N


def find(x):
    if p[x] == x:
        return x
    else:
        p[x] = find(p[x])
        return p[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if r[x] < r[y]:
        p[x] = y
    else:
        p[y] = x
        if r[x] == r[y]:
            r[x] += 1


nc = [1] * N
f = [0] * N
for i in range(M):
    a, b = list(map(int, input().split()))
    nc[a - 1] += 1
    nc[b - 1] += 1
    unite(a - 1, b - 1)
for i in range(K):
    c, d = list(map(int, input().split()))
    if find(c - 1) == find(d - 1):
        nc[c - 1] += 1
        nc[d - 1] += 1
for i in range(N):
    f[find(i)] += 1
print((*[f[find(i)] - nc[i] for i in range(N)]))

import sys

input = sys.stdin.readline
N, M, K = list(map(int, input().split()))
p = list(range(N))
r = [0] * N


def find(x):
    if p[x] == x:
        return x
    else:
        p[x] = find(p[x])
        return p[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return
    if r[x] < r[y]:
        p[x] = y
    else:
        p[y] = x
        if r[x] == r[y]:
            r[x] += 1


nc = [1] * N
f = [0] * N
for i in range(M):
    a, b = list(map(int, input().split()))
    nc[a - 1] += 1
    nc[b - 1] += 1
    unite(a - 1, b - 1)
for i in range(K):
    c, d = list(map(int, input().split()))
    if find(c - 1) == find(d - 1):
        nc[c - 1] += 1
        nc[d - 1] += 1
for i in range(N):
    f[find(i)] += 1
print((*[f[find(i)] - nc[i] for i in range(N)]))

+import sys + +input = sys.stdin.readline -p = [i for i in range(N)] +p = list(range(N))