import sys

input = sys.stdin.readline



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

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

for _ in range(M):

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

    friends_table[a-1] += [b-1]

    friends_table[b-1] += [a-1]



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

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



for i in range(N):

    # すでにDFS済み

    if i != group_list[i]:

        continue

    next_stack = [i]

    friend = [i]

    while next_stack:

        u = next_stack.pop(-1)

        for v in friends_table[u]:

            # 訪問済み

            if i == group_list[v]:

                continue

            friend += [v]

            group_list[v] = i

            next_stack += [v]

    for f in friend:

        friends_candidate[f] = friend



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

for _ in range(K):

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

    if group_list[a-1] == group_list[b-1]:

        blocks_table[a-1] += [b-1]

        blocks_table[b-1] += [a-1]



for i in range(N):

    print((len(friends_candidate[i]) - len(friends_table[i]) - len(blocks_table[i])-1))

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)



class UnionFindPathCompression():

    def __init__(self, n):

        self.parents = list(range(n))

        self.rank = [1]*n

        self.group_size = [1]*n



    def find(self, x):

        if self.parents[x] == x:

            return x

        else:

            self.parents[x] = self.find(self.parents[x])

            return self.parents[x]



    def union(self, x, y):

        #親を探す p = parentの意味

        px = self.find(x)

        py = self.find(y)



        if px == py:

            return

        else:

            if self.rank[px] < self.rank[py]:

                self.parents[px] = py

                self.group_size[py] += self.group_size[px]

            else:

                self.parents[py] = px

                self.group_size[px] += self.group_size[py]

                #ランクの更新

                if self.rank[px] == self.rank[py]:

                    self.rank[px] += 1

                

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

ufpc = UnionFindPathCompression(n)

friends = [[] for i in range(n)]

ans = [-1]*n

for i in range(m):

    a, b = (int(x) for x in input().split())

    a, b = a-1, b-1

    friends[a].append(b)

    friends[b].append(a)

    ufpc.union(a,b)



for i in range(k):

    c, d = (int(x) for x in input().split())

    c, d = c-1, d-1

    if ufpc.find(c) == ufpc.find(d):

        ans[c] -= 1

        ans[d] -= 1



for i in range(n):

    ans[i] += ufpc.group_size[ufpc.find(i)]

    ans[i] -= len(friends[i])



print((*ans))
import sys

input = sys.stdin.readline
N, M, K = list(map(int, input().split()))
friends_table = [[] for i in range(N)]
for _ in range(M):
    a, b = list(map(int, input().split()))
    friends_table[a - 1] += [b - 1]
    friends_table[b - 1] += [a - 1]
group_list = [i for i in range(N)]
friends_candidate = [[] for i in range(N)]
for i in range(N):
    # すでにDFS済み
    if i != group_list[i]:
        continue
    next_stack = [i]
    friend = [i]
    while next_stack:
        u = next_stack.pop(-1)
        for v in friends_table[u]:
            # 訪問済み
            if i == group_list[v]:
                continue
            friend += [v]
            group_list[v] = i
            next_stack += [v]
    for f in friend:
        friends_candidate[f] = friend
blocks_table = [[] for i in range(N)]
for _ in range(K):
    a, b = list(map(int, input().split()))
    if group_list[a - 1] == group_list[b - 1]:
        blocks_table[a - 1] += [b - 1]
        blocks_table[b - 1] += [a - 1]
for i in range(N):
    print(
        (len(friends_candidate[i]) - len(friends_table[i]) - len(blocks_table[i]) - 1)
    )

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)


class UnionFindPathCompression:
    def __init__(self, n):
        self.parents = list(range(n))
        self.rank = [1] * n
        self.group_size = [1] * n

    def find(self, x):
        if self.parents[x] == x:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        # 親を探す p = parentの意味
        px = self.find(x)
        py = self.find(y)
        if px == py:
            return
        else:
            if self.rank[px] < self.rank[py]:
                self.parents[px] = py
                self.group_size[py] += self.group_size[px]
            else:
                self.parents[py] = px
                self.group_size[px] += self.group_size[py]
                # ランクの更新
                if self.rank[px] == self.rank[py]:
                    self.rank[px] += 1


n, m, k = list(map(int, input().split()))
ufpc = UnionFindPathCompression(n)
friends = [[] for i in range(n)]
ans = [-1] * n
for i in range(m):
    a, b = (int(x) for x in input().split())
    a, b = a - 1, b - 1
    friends[a].append(b)
    friends[b].append(a)
    ufpc.union(a, b)
for i in range(k):
    c, d = (int(x) for x in input().split())
    c, d = c - 1, d - 1
    if ufpc.find(c) == ufpc.find(d):
        ans[c] -= 1
        ans[d] -= 1
for i in range(n):
    ans[i] += ufpc.group_size[ufpc.find(i)]
    ans[i] -= len(friends[i])
print((*ans))

-N, M, K = list(map(int, input().split())) -friends_table = [[] for i in range(N)] -for _ in range(M): -    a, b = list(map(int, input().split())) -    friends_table[a - 1] += [b - 1] -    friends_table[b - 1] += [a - 1] -group_list = [i for i in range(N)] -friends_candidate = [[] for i in range(N)] -for i in range(N): -    # すでにDFS済み -    if i != group_list[i]: -        continue -    next_stack = [i] -    friend = [i] -    while next_stack: -        u = next_stack.pop(-1) -        for v in friends_table[u]: -            # 訪問済み -            if i == group_list[v]: -                continue -            friend += [v] -            group_list[v] = i -            next_stack += [v] -    for f in friend: -        friends_candidate[f] = friend -blocks_table = [[] for i in range(N)] -for _ in range(K): -    a, b = list(map(int, input().split())) -    if group_list[a - 1] == group_list[b - 1]: -        blocks_table[a - 1] += [b - 1] -        blocks_table[b - 1] += [a - 1] -for i in range(N): -    print( -        (len(friends_candidate[i]) - len(friends_table[i]) - len(blocks_table[i]) - 1) -    ) +sys.setrecursionlimit(10**7) + + +class UnionFindPathCompression: +    def __init__(self, n): +        self.parents = list(range(n)) +        self.rank = [1] * n +        self.group_size = [1] * n + +    def find(self, x): +        if self.parents[x] == x: +            return x +        else: +            self.parents[x] = self.find(self.parents[x]) +            return self.parents[x] + +    def union(self, x, y): +        # 親を探す p = parentの意味 +        px = self.find(x) +        py = self.find(y) +        if px == py: +            return +        else: +            if self.rank[px] < self.rank[py]: +                self.parents[px] = py +                self.group_size[py] += self.group_size[px] +            else: +                self.parents[py] = px +                self.group_size[px] += self.group_size[py] +                # ランクの更新 +                if self.rank[px] == self.rank[py]: +                    self.rank[px] += 1 + + +n, m, k = list(map(int, input().split())) +ufpc = UnionFindPathCompression(n) +friends = [[] for i in range(n)] +ans = [-1] * n +for i in range(m): +    a, b = (int(x) for x in input().split()) +    a, b = a - 1, b - 1 +    friends[a].append(b) +    friends[b].append(a) +    ufpc.union(a, b) +for i in range(k): +    c, d = (int(x) for x in input().split()) +    c, d = c - 1, d - 1 +    if ufpc.find(c) == ufpc.find(d): +        ans[c] -= 1 +        ans[d] -= 1 +for i in range(n): +    ans[i] += ufpc.group_size[ufpc.find(i)] +    ans[i] -= len(friends[i]) +print((*ans))