class UnionFind:

    def __init__(self, n):

        self.n = n

        self.parent = [i for i in range(n)]

        self.height = [1] * n

        self.size = [1] * n



    def find(self, x):

        if self.parent[x] == x:

            return x

        else:

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

            return self.parent[x]



    def unite(self, x, y):

        x = self.find(x)

        y = self.find(y)

        if x != y:

            if self.height[x] < self.height[y]:

                self.parent[x] = y

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

            else:

                self.parent[y] = x

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

                if self.height[x] == self.height[y]:

                    self.height[x] += 1



    def issame(self, x, y):

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



    def group_size(self, x):

        return self.size[self.find(x)]





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

uf = UnionFind(N)

exc = [set() for _ in range(N)]



for _ in range(M):

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

    exc[a - 1].add(b - 1)

    exc[b - 1].add(a - 1)

    uf.unite(a - 1, b - 1)

for _ in range(K):

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

    if uf.issame(c - 1, d - 1):

        exc[c - 1].add(d - 1)

        exc[d - 1].add(c - 1)



ans = [uf.group_size(i) - len(exc[i]) - 1 for i in range(N)]

print((*ans))

from sys import exit

from collections import Counter

import numpy as np

from scipy.sparse.csgraph import connected_components

from scipy.sparse import csr_matrix



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

exc = [set() for _ in range(N)]

edge = []



if M == 0:

    print((*[0 for _ in range(N)]))

    exit()



for _ in range(M):

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

    exc[a - 1].add(b - 1)

    exc[b - 1].add(a - 1)

    edge.append((a - 1, b - 1))



edge = np.array(edge).T

matr = csr_matrix(([1 for _ in range(M)], edge), (N, N))

_, labels = connected_components(matr)

ct = Counter(labels)



for _ in range(K):

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

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

        exc[c - 1].add(d - 1)

        exc[d - 1].add(c - 1)



ans = [ct[labels[i]] - len(exc[i]) - 1 for i in range(N)]

print((*ans))

class UnionFind:
    def __init__(self, n):
        self.n = n
        self.parent = [i for i in range(n)]
        self.height = [1] * n
        self.size = [1] * n

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

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.height[x] < self.height[y]:
                self.parent[x] = y
                self.size[y] += self.size[x]
            else:
                self.parent[y] = x
                self.size[x] += self.size[y]
                if self.height[x] == self.height[y]:
                    self.height[x] += 1

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

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


N, M, K = list(map(int, input().split()))
uf = UnionFind(N)
exc = [set() for _ in range(N)]
for _ in range(M):
    a, b = list(map(int, input().split()))
    exc[a - 1].add(b - 1)
    exc[b - 1].add(a - 1)
    uf.unite(a - 1, b - 1)
for _ in range(K):
    c, d = list(map(int, input().split()))
    if uf.issame(c - 1, d - 1):
        exc[c - 1].add(d - 1)
        exc[d - 1].add(c - 1)
ans = [uf.group_size(i) - len(exc[i]) - 1 for i in range(N)]
print((*ans))

from sys import exit
from collections import Counter
import numpy as np
from scipy.sparse.csgraph import connected_components
from scipy.sparse import csr_matrix

N, M, K = list(map(int, input().split()))
exc = [set() for _ in range(N)]
edge = []
if M == 0:
    print((*[0 for _ in range(N)]))
    exit()
for _ in range(M):
    a, b = list(map(int, input().split()))
    exc[a - 1].add(b - 1)
    exc[b - 1].add(a - 1)
    edge.append((a - 1, b - 1))
edge = np.array(edge).T
matr = csr_matrix(([1 for _ in range(M)], edge), (N, N))
_, labels = connected_components(matr)
ct = Counter(labels)
for _ in range(K):
    c, d = list(map(int, input().split()))
    if labels[c - 1] == labels[d - 1]:
        exc[c - 1].add(d - 1)
        exc[d - 1].add(c - 1)
ans = [ct[labels[i]] - len(exc[i]) - 1 for i in range(N)]
print((*ans))

-class UnionFind: -    def __init__(self, n): -        self.n = n -        self.parent = [i for i in range(n)] -        self.height = [1] * n -        self.size = [1] * n - -    def find(self, x): -        if self.parent[x] == x: -            return x -        else: -            self.parent[x] = self.find(self.parent[x]) -            return self.parent[x] - -    def unite(self, x, y): -        x = self.find(x) -        y = self.find(y) -        if x != y: -            if self.height[x] < self.height[y]: -                self.parent[x] = y -                self.size[y] += self.size[x] -            else: -                self.parent[y] = x -                self.size[x] += self.size[y] -                if self.height[x] == self.height[y]: -                    self.height[x] += 1 - -    def issame(self, x, y): -        return self.find(x) == self.find(y) - -    def group_size(self, x): -        return self.size[self.find(x)] - +from sys import exit +from collections import Counter +import numpy as np +from scipy.sparse.csgraph import connected_components +from scipy.sparse import csr_matrix -uf = UnionFind(N) +edge = [] +if M == 0: +    print((*[0 for _ in range(N)])) +    exit() -    uf.unite(a - 1, b - 1) +    edge.append((a - 1, b - 1)) +edge = np.array(edge).T +matr = csr_matrix(([1 for _ in range(M)], edge), (N, N)) +_, labels = connected_components(matr) +ct = Counter(labels) -    if uf.issame(c - 1, d - 1): +    if labels[c - 1] == labels[d - 1]: -ans = [uf.group_size(i) - len(exc[i]) - 1 for i in range(N)] +ans = [ct[labels[i]] - len(exc[i]) - 1 for i in range(N)]