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



import sys

sys.setrecursionlimit(10**9) #再帰の上限をあげる



root=[-1 for i in range(n+1)] #自分が親ならグループの人数のマイナス倍を、そうでないなら（元）親の番号を示す



def r(x):   #親は誰？

    if root[x]<0:

        return x

    else:

        root[x]=r(root[x])

        return root[x]



def unite(x,y):

    x=r(x)

    y=r(y)

    if x==y:

        return

    if x>y:

        x,y=y,x

    root[x]+=root[y]

    root[y]=x





fre=[[] for _ in range(n+1)]

bro=[[] for _ in range(n+1)]



for i in range(m):

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

    unite(a,b)

    fre[a].append(b)

    fre[b].append(a)



for i in range(k):

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

    bro[a].append(b)

    bro[b].append(a)



ans=[]

for i in range(1,n+1):

    anser=-root[r(i)]-1

    anser-=len(fre[i])

    for j in bro[i]:

        if r(i)==r(j):

            anser-=1

    ans.append(str(anser))

print((" ".join(ans)))





from _collections import deque

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



fre=[[] for _ in range(n+1)]

bro=[[] for _ in range(n+1)]



for i in range(m):

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

    fre[a].append(b)

    fre[b].append(a)



for i in range(k):

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

    bro[a].append(b)

    bro[b].append(a)



ans=[]



x=[-1]*(n+1)



for i in range(1,n+1):

    if x[i]==-1:

        x[i]=i

        data=deque([i])

        while len(data)>0:

            p=data.popleft()

            for j in fre[p]:

                if x[j]==-1:

                    x[j]=i

                    data.append(j)

g=[0]*(n+1)

for i in range(1,n+1):

    g[x[i]]+=1

for i in range(1,n+1):

    g[i]=g[x[i]]



for i in range(1,n+1):

    aa=g[i]-1

    aa-=len(fre[i])

    for j in bro[i]:

        if x[i]==x[j]:

            aa-=1

    ans.append(str(aa))

print((" ".join(ans)))



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

sys.setrecursionlimit(10**9)  # 再帰の上限をあげる
root = [-1 for i in range(n + 1)]  # 自分が親ならグループの人数のマイナス倍を、そうでないなら（元）親の番号を示す


def r(x):  # 親は誰？
    if root[x] < 0:
        return x
    else:
        root[x] = r(root[x])
        return root[x]


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


fre = [[] for _ in range(n + 1)]
bro = [[] for _ in range(n + 1)]
for i in range(m):
    a, b = list(map(int, input().split()))
    unite(a, b)
    fre[a].append(b)
    fre[b].append(a)
for i in range(k):
    a, b = list(map(int, input().split()))
    bro[a].append(b)
    bro[b].append(a)
ans = []
for i in range(1, n + 1):
    anser = -root[r(i)] - 1
    anser -= len(fre[i])
    for j in bro[i]:
        if r(i) == r(j):
            anser -= 1
    ans.append(str(anser))
print((" ".join(ans)))

from _collections import deque

n, m, k = list(map(int, input().split()))
fre = [[] for _ in range(n + 1)]
bro = [[] for _ in range(n + 1)]
for i in range(m):
    a, b = list(map(int, input().split()))
    fre[a].append(b)
    fre[b].append(a)
for i in range(k):
    a, b = list(map(int, input().split()))
    bro[a].append(b)
    bro[b].append(a)
ans = []
x = [-1] * (n + 1)
for i in range(1, n + 1):
    if x[i] == -1:
        x[i] = i
        data = deque([i])
        while len(data) > 0:
            p = data.popleft()
            for j in fre[p]:
                if x[j] == -1:
                    x[j] = i
                    data.append(j)
g = [0] * (n + 1)
for i in range(1, n + 1):
    g[x[i]] += 1
for i in range(1, n + 1):
    g[i] = g[x[i]]
for i in range(1, n + 1):
    aa = g[i] - 1
    aa -= len(fre[i])
    for j in bro[i]:
        if x[i] == x[j]:
            aa -= 1
    ans.append(str(aa))
print((" ".join(ans)))

+from _collections import deque + -import sys - -sys.setrecursionlimit(10**9)  # 再帰の上限をあげる -root = [-1 for i in range(n + 1)]  # 自分が親ならグループの人数のマイナス倍を、そうでないなら（元）親の番号を示す - - -def r(x):  # 親は誰？ -    if root[x] < 0: -        return x -    else: -        root[x] = r(root[x]) -        return root[x] - - -def unite(x, y): -    x = r(x) -    y = r(y) -    if x == y: -        return -    if x > y: -        x, y = y, x -    root[x] += root[y] -    root[y] = x - - -    unite(a, b) +x = [-1] * (n + 1) -    anser = -root[r(i)] - 1 -    anser -= len(fre[i]) +    if x[i] == -1: +        x[i] = i +        data = deque([i]) +        while len(data) > 0: +            p = data.popleft() +            for j in fre[p]: +                if x[j] == -1: +                    x[j] = i +                    data.append(j) +g = [0] * (n + 1) +for i in range(1, n + 1): +    g[x[i]] += 1 +for i in range(1, n + 1): +    g[i] = g[x[i]] +for i in range(1, n + 1): +    aa = g[i] - 1 +    aa -= len(fre[i]) -        if r(i) == r(j): -            anser -= 1 -    ans.append(str(anser)) +        if x[i] == x[j]: +            aa -= 1 +    ans.append(str(aa))