# D - Friend Suggestions

from collections import Counter

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

AB = [tuple(map(int,input().split())) for i in range(M)]

CD = [tuple(map(int,input().split())) for i in range(K)]



class UnionFind:

    def __init__(self,N):

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

        self.rank = [0] * N

        self.count = 0

    def root(self,a):

        if self.parent[a] == a:

            return a

        else:

            self.parent[a] = self.root(self.parent[a])

            return self.parent[a]

    def is_same(self,a,b):

        return self.root(a) == self.root(b)

    def unite(self,a,b):

        ra = self.root(a)

        rb = self.root(b)

        if ra == rb: return

        if self.rank[ra] < self.rank[rb]:

            self.parent[ra] = rb

        else:

            self.parent[rb] = ra

            if self.rank[ra] == self.rank[rb]: self.rank[ra] += 1

        self.count += 1



blocks = [[] for _ in range(N)]

for c,d in CD:

    c,d = c-1,d-1

    blocks[c].append(d)

    blocks[d].append(c)



friends = [0] * N

uf = UnionFind(N)

for a,b in AB:

    a,b = a-1,b-1

    friends[a] += 1

    friends[b] += 1

    if uf.is_same(a,b): continue

    uf.unite(a,b)

for i in range(N):

    uf.root(i)



ctr = Counter()

for i in range(N):

    r = uf.root(i)

    ctr[r] += 1



ans = []

for i in range(N):

    tmp = ctr[uf.root(i)] - 1 - friends[i]

    for b in blocks[i]:

        if uf.is_same(i,b):

            tmp -= 1

    ans.append(tmp)

print((*ans))

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10**7)

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



class UnionFind:

    def __init__(self, n):

        self.p = [-1]*n

        # union by rank

        self.r = [1]*n



    def find(self, x):

        if self.p[x] < 0:

            return x

        else:

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

            return self.p[x]



    def union(self, x, y):

        rx, ry = self.find(x), self.find(y)



        if rx != ry:

            if self.r[rx] > self.r[ry]:

                rx, ry = ry, rx

            if self.r[rx] == self.r[ry]:

                self.r[ry] += 1

            self.p[ry] += self.p[rx]

            self.p[rx] = ry



    def same(self, x, y):

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



    def count_member(self, x):

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





uf = UnionFind(n)

ab = []

cd = []



for _ in range(m):

    a, b = [int(x)-1 for x in input().split()]

    ab.append((a, b))

    uf.union(a, b)



for _ in range(k):

    c, d = [int(x)-1 for x in input().split()]

    cd.append((c, d))



ans = [uf.count_member(i)-1 for i in range(n)]



for a, b in ab:

    if uf.same(a, b):

        ans[a] -= 1

        ans[b] -= 1



for c, d in cd:

    if uf.same(c, d):

        ans[c] -= 1

        ans[d] -= 1



print((*ans))

# D - Friend Suggestions
from collections import Counter

N, M, K = list(map(int, input().split()))
AB = [tuple(map(int, input().split())) for i in range(M)]
CD = [tuple(map(int, input().split())) for i in range(K)]


class UnionFind:
    def __init__(self, N):
        self.parent = [i for i in range(N)]
        self.rank = [0] * N
        self.count = 0

    def root(self, a):
        if self.parent[a] == a:
            return a
        else:
            self.parent[a] = self.root(self.parent[a])
            return self.parent[a]

    def is_same(self, a, b):
        return self.root(a) == self.root(b)

    def unite(self, a, b):
        ra = self.root(a)
        rb = self.root(b)
        if ra == rb:
            return
        if self.rank[ra] < self.rank[rb]:
            self.parent[ra] = rb
        else:
            self.parent[rb] = ra
            if self.rank[ra] == self.rank[rb]:
                self.rank[ra] += 1
        self.count += 1


blocks = [[] for _ in range(N)]
for c, d in CD:
    c, d = c - 1, d - 1
    blocks[c].append(d)
    blocks[d].append(c)
friends = [0] * N
uf = UnionFind(N)
for a, b in AB:
    a, b = a - 1, b - 1
    friends[a] += 1
    friends[b] += 1
    if uf.is_same(a, b):
        continue
    uf.unite(a, b)
for i in range(N):
    uf.root(i)
ctr = Counter()
for i in range(N):
    r = uf.root(i)
    ctr[r] += 1
ans = []
for i in range(N):
    tmp = ctr[uf.root(i)] - 1 - friends[i]
    for b in blocks[i]:
        if uf.is_same(i, b):
            tmp -= 1
    ans.append(tmp)
print((*ans))

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
n, m, k = list(map(int, input().split()))


class UnionFind:
    def __init__(self, n):
        self.p = [-1] * n
        # union by rank
        self.r = [1] * n

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

    def union(self, x, y):
        rx, ry = self.find(x), self.find(y)
        if rx != ry:
            if self.r[rx] > self.r[ry]:
                rx, ry = ry, rx
            if self.r[rx] == self.r[ry]:
                self.r[ry] += 1
            self.p[ry] += self.p[rx]
            self.p[rx] = ry

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

    def count_member(self, x):
        return -self.p[self.find(x)]


uf = UnionFind(n)
ab = []
cd = []
for _ in range(m):
    a, b = [int(x) - 1 for x in input().split()]
    ab.append((a, b))
    uf.union(a, b)
for _ in range(k):
    c, d = [int(x) - 1 for x in input().split()]
    cd.append((c, d))
ans = [uf.count_member(i) - 1 for i in range(n)]
for a, b in ab:
    if uf.same(a, b):
        ans[a] -= 1
        ans[b] -= 1
for c, d in cd:
    if uf.same(c, d):
        ans[c] -= 1
        ans[d] -= 1
print((*ans))

-# D - Friend Suggestions -from collections import Counter +import sys -N, M, K = list(map(int, input().split())) -AB = [tuple(map(int, input().split())) for i in range(M)] -CD = [tuple(map(int, input().split())) for i in range(K)] +input = sys.stdin.readline +sys.setrecursionlimit(10**7) +n, m, k = list(map(int, input().split())) -    def __init__(self, N): -        self.parent = [i for i in range(N)] -        self.rank = [0] * N -        self.count = 0 +    def __init__(self, n): +        self.p = [-1] * n +        # union by rank +        self.r = [1] * n -    def root(self, a): -        if self.parent[a] == a: -            return a +    def find(self, x): +        if self.p[x] < 0: +            return x -            self.parent[a] = self.root(self.parent[a]) -            return self.parent[a] +            self.p[x] = self.find(self.p[x]) +            return self.p[x] -    def is_same(self, a, b): -        return self.root(a) == self.root(b) +    def union(self, x, y): +        rx, ry = self.find(x), self.find(y) +        if rx != ry: +            if self.r[rx] > self.r[ry]: +                rx, ry = ry, rx +            if self.r[rx] == self.r[ry]: +                self.r[ry] += 1 +            self.p[ry] += self.p[rx] +            self.p[rx] = ry -    def unite(self, a, b): -        ra = self.root(a) -        rb = self.root(b) -        if ra == rb: -            return -        if self.rank[ra] < self.rank[rb]: -            self.parent[ra] = rb -        else: -            self.parent[rb] = ra -            if self.rank[ra] == self.rank[rb]: -                self.rank[ra] += 1 -        self.count += 1 +    def same(self, x, y): +        return self.find(x) == self.find(y) + +    def count_member(self, x): +        return -self.p[self.find(x)] -blocks = [[] for _ in range(N)] -for c, d in CD: -    c, d = c - 1, d - 1 -    blocks[c].append(d) -    blocks[d].append(c) -friends = [0] * N -uf = UnionFind(N) -for a, b in AB: -    a, b = a - 1, b - 1 -    friends[a] += 1 -    friends[b] += 1 -    if uf.is_same(a, b): -        continue -    uf.unite(a, b) -for i in range(N): -    uf.root(i) -ctr = Counter() -for i in range(N): -    r = uf.root(i) -    ctr[r] += 1 -ans = [] -for i in range(N): -    tmp = ctr[uf.root(i)] - 1 - friends[i] -    for b in blocks[i]: -        if uf.is_same(i, b): -            tmp -= 1 -    ans.append(tmp) +uf = UnionFind(n) +ab = [] +cd = [] +for _ in range(m): +    a, b = [int(x) - 1 for x in input().split()] +    ab.append((a, b)) +    uf.union(a, b) +for _ in range(k): +    c, d = [int(x) - 1 for x in input().split()] +    cd.append((c, d)) +ans = [uf.count_member(i) - 1 for i in range(n)] +for a, b in ab: +    if uf.same(a, b): +        ans[a] -= 1 +        ans[b] -= 1 +for c, d in cd: +    if uf.same(c, d): +        ans[c] -= 1 +        ans[d] -= 1