import sys

from collections import deque



readline = sys.stdin.readline

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



friend = [set() for i in range(n)]

not_friend = [set() for i in range(n)]

for i in range(m):

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

    a -= 1

    b -= 1

    friend[a].add(b)

    friend[b].add(a)

for i in range(k):

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

    c -= 1

    d -= 1

    not_friend[c].add(d)

    not_friend[d].add(c)



suggest_friends = [-1] * n

for i in range(n):

    if suggest_friends[i] != -1:

        continue

    q = deque(friend[i])

    friend_group = set(friend[i])

    while q:

        p = q.popleft()

        for f in friend[p]:

            if not(f in friend_group):

                q.append(f)

                friend_group.add(f)

    num = len(friend_group)

    for f in friend_group:

        suggest_friends[f] = num - 1 - len(friend[f] | not_friend[f] & friend_group)



for i in range(n):

    if suggest_friends[i] == -1:

        suggest_friends[i] = 0

print((*suggest_friends))

import sys





class UnionFind():

    def __init__(self, n):

        self.parents = [-1] * n



    def find(self, x):

        if self.parents[x] < 0:

            return x

        else:

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

            return self.parents[x]



    def union(self, x, y):

        x = self.find(x)

        y = self.find(y)



        if x == y:

            return False

        if self.parents[x] > self.parents[y]:

            x, y = y, x



        self.parents[x] += self.parents[y]

        self.parents[y] = x

        return True



    def size(self, x):

        return -self.parents[self.find(x)]



    def same(self, x, y):

        return self.find(x) == self.find(y)





readline = sys.stdin.readline

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

ab = tuple(tuple(map(int, readline().split())) for i in range(m))

cd = (list(map(int, readline().split())) for i in range(k))



friend_group = UnionFind(n)

for a, b in ab:

    friend_group.union(a-1, b-1)



ans = [friend_group.size(i) - 1 for i in range(n)]

for a, b in ab:

    ans[a-1] -= 1

    ans[b-1] -= 1

for c, d in cd:

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

        ans[c-1] -= 1

        ans[d-1] -= 1



print((*ans))

import sys
from collections import deque

readline = sys.stdin.readline
n, m, k = list(map(int, readline().split()))
friend = [set() for i in range(n)]
not_friend = [set() for i in range(n)]
for i in range(m):
    a, b = list(map(int, readline().split()))
    a -= 1
    b -= 1
    friend[a].add(b)
    friend[b].add(a)
for i in range(k):
    c, d = list(map(int, readline().split()))
    c -= 1
    d -= 1
    not_friend[c].add(d)
    not_friend[d].add(c)
suggest_friends = [-1] * n
for i in range(n):
    if suggest_friends[i] != -1:
        continue
    q = deque(friend[i])
    friend_group = set(friend[i])
    while q:
        p = q.popleft()
        for f in friend[p]:
            if not (f in friend_group):
                q.append(f)
                friend_group.add(f)
    num = len(friend_group)
    for f in friend_group:
        suggest_friends[f] = num - 1 - len(friend[f] | not_friend[f] & friend_group)
for i in range(n):
    if suggest_friends[i] == -1:
        suggest_friends[i] = 0
print((*suggest_friends))

import sys


class UnionFind:
    def __init__(self, n):
        self.parents = [-1] * n

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

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x
        return True

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)


readline = sys.stdin.readline
n, m, k = list(map(int, readline().split()))
ab = tuple(tuple(map(int, readline().split())) for i in range(m))
cd = (list(map(int, readline().split())) for i in range(k))
friend_group = UnionFind(n)
for a, b in ab:
    friend_group.union(a - 1, b - 1)
ans = [friend_group.size(i) - 1 for i in range(n)]
for a, b in ab:
    ans[a - 1] -= 1
    ans[b - 1] -= 1
for c, d in cd:
    if friend_group.same(c - 1, d - 1):
        ans[c - 1] -= 1
        ans[d - 1] -= 1
print((*ans))

-from collections import deque + + +class UnionFind: +    def __init__(self, n): +        self.parents = [-1] * n + +    def find(self, x): +        if self.parents[x] < 0: +            return x +        else: +            self.parents[x] = self.find(self.parents[x]) +            return self.parents[x] + +    def union(self, x, y): +        x = self.find(x) +        y = self.find(y) +        if x == y: +            return False +        if self.parents[x] > self.parents[y]: +            x, y = y, x +        self.parents[x] += self.parents[y] +        self.parents[y] = x +        return True + +    def size(self, x): +        return -self.parents[self.find(x)] + +    def same(self, x, y): +        return self.find(x) == self.find(y) + -friend = [set() for i in range(n)] -not_friend = [set() for i in range(n)] -for i in range(m): -    a, b = list(map(int, readline().split())) -    a -= 1 -    b -= 1 -    friend[a].add(b) -    friend[b].add(a) -for i in range(k): -    c, d = list(map(int, readline().split())) -    c -= 1 -    d -= 1 -    not_friend[c].add(d) -    not_friend[d].add(c) -suggest_friends = [-1] * n -for i in range(n): -    if suggest_friends[i] != -1: -        continue -    q = deque(friend[i]) -    friend_group = set(friend[i]) -    while q: -        p = q.popleft() -        for f in friend[p]: -            if not (f in friend_group): -                q.append(f) -                friend_group.add(f) -    num = len(friend_group) -    for f in friend_group: -        suggest_friends[f] = num - 1 - len(friend[f] | not_friend[f] & friend_group) -for i in range(n): -    if suggest_friends[i] == -1: -        suggest_friends[i] = 0 -print((*suggest_friends)) +ab = tuple(tuple(map(int, readline().split())) for i in range(m)) +cd = (list(map(int, readline().split())) for i in range(k)) +friend_group = UnionFind(n) +for a, b in ab: +    friend_group.union(a - 1, b - 1) +ans = [friend_group.size(i) - 1 for i in range(n)] +for a, b in ab: +    ans[a - 1] -= 1 +    ans[b - 1] -= 1 +for c, d in cd: +    if friend_group.same(c - 1, d - 1): +        ans[c - 1] -= 1 +        ans[d - 1] -= 1 +print((*ans))