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



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

            x, y = y, x



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

        self.parents[y] = x





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

uf = UnionFind(N)

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

for _ in range(M):

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

    a -= 1; b -= 1

    uf.union(a, b)

    direct[a].add(b)

    direct[b].add(a)

for _ in range(K):

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

    a -= 1; b -= 1

    if uf.find(a) == uf.find(b):

        direct[a].add(b)

        direct[b].add(a)

ans = []

for i in range(N):

    cnt = -uf.parents[uf.find(i)] - 1

    cnt -= len(direct[i])

    ans.append(cnt)



print((*ans))

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



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

            x, y = y, x



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

        self.parents[y] = x





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

uf = UnionFind(N)

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

IN = sys.stdin.readlines()

for i in range(M):

    a, b = list(map(int, IN[i].split()))

    a -= 1; b -= 1

    uf.union(a, b)

    direct[a].add(b)

    direct[b].add(a)

for i in range(M, M + K):

    a, b = list(map(int, IN[i].split()))

    a -= 1; b -= 1

    if uf.find(a) == uf.find(b):

        direct[a].add(b)

        direct[b].add(a)

ans = []

for i in range(N):

    cnt = -uf.parents[uf.find(i)] - 1

    cnt -= len(direct[i])

    ans.append(cnt)



print((*ans))

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
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x


N, M, K = list(map(int, input().split()))
uf = UnionFind(N)
direct = [set() for _ in range(N)]
for _ in range(M):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    uf.union(a, b)
    direct[a].add(b)
    direct[b].add(a)
for _ in range(K):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    if uf.find(a) == uf.find(b):
        direct[a].add(b)
        direct[b].add(a)
ans = []
for i in range(N):
    cnt = -uf.parents[uf.find(i)] - 1
    cnt -= len(direct[i])
    ans.append(cnt)
print((*ans))

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
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x


N, M, K = list(map(int, input().split()))
uf = UnionFind(N)
direct = [set() for _ in range(N)]
IN = sys.stdin.readlines()
for i in range(M):
    a, b = list(map(int, IN[i].split()))
    a -= 1
    b -= 1
    uf.union(a, b)
    direct[a].add(b)
    direct[b].add(a)
for i in range(M, M + K):
    a, b = list(map(int, IN[i].split()))
    a -= 1
    b -= 1
    if uf.find(a) == uf.find(b):
        direct[a].add(b)
        direct[b].add(a)
ans = []
for i in range(N):
    cnt = -uf.parents[uf.find(i)] - 1
    cnt -= len(direct[i])
    ans.append(cnt)
print((*ans))

+import sys + + -for _ in range(M): -    a, b = list(map(int, input().split())) +IN = sys.stdin.readlines() +for i in range(M): +    a, b = list(map(int, IN[i].split())) -for _ in range(K): -    a, b = list(map(int, input().split())) +for i in range(M, M + K): +    a, b = list(map(int, IN[i].split()))