from collections import deque

import sys

input = sys.stdin.readline

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

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

for _ in range(m):

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

    friend[a-1].append(b-1)

    friend[b-1].append(a-1)

check = [0]*n

union = [-1]*n

union[0] = 0

for i in range(n):

    if check[i]: continue

    que = deque([i])

    while que:

        u = que.popleft()

        for v in friend[u]:

            if check[v]: continue

            union[v] = i

            check[v] = 1

            que.append(v)

            

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

for _ in range(k):

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

    if union[c-1] == union[d-1]:

        brock[c-1].append(d-1)

        brock[d-1].append(c-1)

        

ans = [0]*n

check = [0]*n

for i in range(n):

    if check[i] or union[i]==-1: continue

    que = deque([i])

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

        if union[j] == union[i]: que.append(j)

    res = len(que)

    while que:

        u = que.popleft()

        check[u] = 1

        ans[u] = res-len(friend[u])-len(brock[u])-1

print((*ans))
def find(x):

    if par[x] < 0:

        return x

    else:

        par[x] = find(par[x])

        return par[x]



def unite(x,y):

    x = find(x)

    y = find(y)

    

    if x == y: return False

    #sizeの大きいほうがx

    if par[x] > par[y]: x,y = y,x

    par[x] += par[y]

    par[y] = x

    return True



#xとyが同じ集合に属するかの判定

def same(x,y):

    return find(x) == find(y)



#xが属する集合の個数

def size(x):

    return -par[find(x)]



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

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

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

par = [-1]*n





for _ in range(m):

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

    unite(a-1, b-1)

    friend[a-1].append(b-1)

    friend[b-1].append(a-1)

for _ in range(k):

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

    enemy[a-1].append(b-1)

    enemy[b-1].append(a-1)

ans = []

for i in range(n):

    block = 0

    for j in enemy[i]:

        if same(i, j): block += 1

    ans.append(size(i)-len(friend[i])-block-1)

print((*ans))
from collections import deque
import sys

input = sys.stdin.readline
n, m, k = list(map(int, input().split()))
friend = [[] for _ in range(n)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    friend[a - 1].append(b - 1)
    friend[b - 1].append(a - 1)
check = [0] * n
union = [-1] * n
union[0] = 0
for i in range(n):
    if check[i]:
        continue
    que = deque([i])
    while que:
        u = que.popleft()
        for v in friend[u]:
            if check[v]:
                continue
            union[v] = i
            check[v] = 1
            que.append(v)
brock = [[] for _ in range(n)]
for _ in range(k):
    c, d = list(map(int, input().split()))
    if union[c - 1] == union[d - 1]:
        brock[c - 1].append(d - 1)
        brock[d - 1].append(c - 1)
ans = [0] * n
check = [0] * n
for i in range(n):
    if check[i] or union[i] == -1:
        continue
    que = deque([i])
    for j in range(i + 1, n):
        if union[j] == union[i]:
            que.append(j)
    res = len(que)
    while que:
        u = que.popleft()
        check[u] = 1
        ans[u] = res - len(friend[u]) - len(brock[u]) - 1
print((*ans))

def find(x):
    if par[x] < 0:
        return x
    else:
        par[x] = find(par[x])
        return par[x]


def unite(x, y):
    x = find(x)
    y = find(y)
    if x == y:
        return False
    # sizeの大きいほうがx
    if par[x] > par[y]:
        x, y = y, x
    par[x] += par[y]
    par[y] = x
    return True


# xとyが同じ集合に属するかの判定
def same(x, y):
    return find(x) == find(y)


# xが属する集合の個数
def size(x):
    return -par[find(x)]


n, m, k = list(map(int, input().split()))
friend = [[] for _ in range(n)]
enemy = [[] for _ in range(n)]
par = [-1] * n
for _ in range(m):
    a, b = list(map(int, input().split()))
    unite(a - 1, b - 1)
    friend[a - 1].append(b - 1)
    friend[b - 1].append(a - 1)
for _ in range(k):
    a, b = list(map(int, input().split()))
    enemy[a - 1].append(b - 1)
    enemy[b - 1].append(a - 1)
ans = []
for i in range(n):
    block = 0
    for j in enemy[i]:
        if same(i, j):
            block += 1
    ans.append(size(i) - len(friend[i]) - block - 1)
print((*ans))

-from collections import deque -import sys +def find(x): +    if par[x] < 0: +        return x +    else: +        par[x] = find(par[x]) +        return par[x] -input = sys.stdin.readline + +def unite(x, y): +    x = find(x) +    y = find(y) +    if x == y: +        return False +    # sizeの大きいほうがx +    if par[x] > par[y]: +        x, y = y, x +    par[x] += par[y] +    par[y] = x +    return True + + +# xとyが同じ集合に属するかの判定 +def same(x, y): +    return find(x) == find(y) + + +# xが属する集合の個数 +def size(x): +    return -par[find(x)] + + +enemy = [[] for _ in range(n)] +par = [-1] * n +    unite(a - 1, b - 1) -check = [0] * n -union = [-1] * n -union[0] = 0 +for _ in range(k): +    a, b = list(map(int, input().split())) +    enemy[a - 1].append(b - 1) +    enemy[b - 1].append(a - 1) +ans = [] -    if check[i]: -        continue -    que = deque([i]) -    while que: -        u = que.popleft() -        for v in friend[u]: -            if check[v]: -                continue -            union[v] = i -            check[v] = 1 -            que.append(v) -brock = [[] for _ in range(n)] -for _ in range(k): -    c, d = list(map(int, input().split())) -    if union[c - 1] == union[d - 1]: -        brock[c - 1].append(d - 1) -        brock[d - 1].append(c - 1) -ans = [0] * n -check = [0] * n -for i in range(n): -    if check[i] or union[i] == -1: -        continue -    que = deque([i]) -    for j in range(i + 1, n): -        if union[j] == union[i]: -            que.append(j) -    res = len(que) -    while que: -        u = que.popleft() -        check[u] = 1 -        ans[u] = res - len(friend[u]) - len(brock[u]) - 1 +    block = 0 +    for j in enemy[i]: +        if same(i, j): +            block += 1 +    ans.append(size(i) - len(friend[i]) - block - 1)