



from collections import defaultdict

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

ns = defaultdict(set)

bs = defaultdict(set)

for i in range(m):

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

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

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

for i in range(k):

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

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

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

    

s = [0]

start = 0

parent = [None] * n

starts = defaultdict(int)

starts[0] = 0

notdone = set(list(range(n)))

notdone.remove(start)

while notdone or s:

    u = s.pop()

    parent[u] = start

    starts[start] += 1

    for v in ns[u]:

        if v in notdone:

            s.append(v)

            notdone.remove(v)

    if not s and notdone:

        start = notdone.pop()

        parent[start] = start

        s.append(start)

ans = [None] * n

for u in range(n):

    val = starts[parent[u]] - 1 - len(ns[u])

    for v in bs[u]:

        if parent[v]==parent[u]:

            val -= 1

    ans[u] = val

print((" ".join(map(str, ans))))
import sys

input = lambda : sys.stdin.readline().rstrip()

sys.setrecursionlimit(max(1000, 10**9))

write = lambda x: sys.stdout.write(x+"\n")





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

class UnionFindTree:

    def __init__(self, n):

        self.n = n

        self.parent = list(range(n))

        self.size = [1] * n



    def root(self, i):

        inter = set()

        while self.parent[i]!=i:

            inter.add(i)

            i = self.parent[i]

        r = i

        for i in inter:

            self.parent[i] = r

        return r



    def connect(self, i, j):

        if i==j:

            return

        ri = self.root(i)

        rj = self.root(j)

        if ri==rj:

            return

        if self.size[ri]<self.size[rj]:

            self.parent[ri] = rj

            self.size[rj] += self.size[ri]

        else:

            self.parent[rj] = ri

            self.size[ri] += self.size[rj]

    

uf = UnionFindTree(n)

ns = [[] for _ in range(n)]

for i in range(m):

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

    uf.connect(a,b)

    ns[a].append(b)

    ns[b].append(a)



for i in range(k):

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

    ns[c].append(d)

    ns[d].append(c)

    

ans = [None]*n

for i in range(n):

    r = uf.root(i)

    s = uf.size[r]

    v = 0

    for j in ns[i]:

        if r==uf.root(j):

            v += 1

    ans[i] = s - v - 1

write(" ".join(map(str, ans)))
from collections import defaultdict

n, m, k = list(map(int, input().split()))
ns = defaultdict(set)
bs = defaultdict(set)
for i in range(m):
    a, b = list(map(int, input().split()))
    ns[a - 1].add(b - 1)
    ns[b - 1].add(a - 1)
for i in range(k):
    c, d = list(map(int, input().split()))
    bs[c - 1].add(d - 1)
    bs[d - 1].add(c - 1)
s = [0]
start = 0
parent = [None] * n
starts = defaultdict(int)
starts[0] = 0
notdone = set(list(range(n)))
notdone.remove(start)
while notdone or s:
    u = s.pop()
    parent[u] = start
    starts[start] += 1
    for v in ns[u]:
        if v in notdone:
            s.append(v)
            notdone.remove(v)
    if not s and notdone:
        start = notdone.pop()
        parent[start] = start
        s.append(start)
ans = [None] * n
for u in range(n):
    val = starts[parent[u]] - 1 - len(ns[u])
    for v in bs[u]:
        if parent[v] == parent[u]:
            val -= 1
    ans[u] = val
print((" ".join(map(str, ans))))

import sys

input = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x + "\n")
n, m, k = list(map(int, input().split()))


class UnionFindTree:
    def __init__(self, n):
        self.n = n
        self.parent = list(range(n))
        self.size = [1] * n

    def root(self, i):
        inter = set()
        while self.parent[i] != i:
            inter.add(i)
            i = self.parent[i]
        r = i
        for i in inter:
            self.parent[i] = r
        return r

    def connect(self, i, j):
        if i == j:
            return
        ri = self.root(i)
        rj = self.root(j)
        if ri == rj:
            return
        if self.size[ri] < self.size[rj]:
            self.parent[ri] = rj
            self.size[rj] += self.size[ri]
        else:
            self.parent[rj] = ri
            self.size[ri] += self.size[rj]


uf = UnionFindTree(n)
ns = [[] for _ in range(n)]
for i in range(m):
    a, b = [int(x) - 1 for x in input().split()]
    uf.connect(a, b)
    ns[a].append(b)
    ns[b].append(a)
for i in range(k):
    c, d = [int(x) - 1 for x in input().split()]
    ns[c].append(d)
    ns[d].append(c)
ans = [None] * n
for i in range(n):
    r = uf.root(i)
    s = uf.size[r]
    v = 0
    for j in ns[i]:
        if r == uf.root(j):
            v += 1
    ans[i] = s - v - 1
write(" ".join(map(str, ans)))

-from collections import defaultdict +import sys +input = lambda: sys.stdin.readline().rstrip() +sys.setrecursionlimit(max(1000, 10**9)) +write = lambda x: sys.stdout.write(x + "\n") -ns = defaultdict(set) -bs = defaultdict(set) + + +class UnionFindTree: +    def __init__(self, n): +        self.n = n +        self.parent = list(range(n)) +        self.size = [1] * n + +    def root(self, i): +        inter = set() +        while self.parent[i] != i: +            inter.add(i) +            i = self.parent[i] +        r = i +        for i in inter: +            self.parent[i] = r +        return r + +    def connect(self, i, j): +        if i == j: +            return +        ri = self.root(i) +        rj = self.root(j) +        if ri == rj: +            return +        if self.size[ri] < self.size[rj]: +            self.parent[ri] = rj +            self.size[rj] += self.size[ri] +        else: +            self.parent[rj] = ri +            self.size[ri] += self.size[rj] + + +uf = UnionFindTree(n) +ns = [[] for _ in range(n)] -    a, b = list(map(int, input().split())) -    ns[a - 1].add(b - 1) -    ns[b - 1].add(a - 1) +    a, b = [int(x) - 1 for x in input().split()] +    uf.connect(a, b) +    ns[a].append(b) +    ns[b].append(a) -    c, d = list(map(int, input().split())) -    bs[c - 1].add(d - 1) -    bs[d - 1].add(c - 1) -s = [0] -start = 0 -parent = [None] * n -starts = defaultdict(int) -starts[0] = 0 -notdone = set(list(range(n))) -notdone.remove(start) -while notdone or s: -    u = s.pop() -    parent[u] = start -    starts[start] += 1 -    for v in ns[u]: -        if v in notdone: -            s.append(v) -            notdone.remove(v) -    if not s and notdone: -        start = notdone.pop() -        parent[start] = start -        s.append(start) +    c, d = [int(x) - 1 for x in input().split()] +    ns[c].append(d) +    ns[d].append(c) -for u in range(n): -    val = starts[parent[u]] - 1 - len(ns[u]) -    for v in bs[u]: -        if parent[v] == parent[u]: -            val -= 1 -    ans[u] = val -print((" ".join(map(str, ans)))) +for i in range(n): +    r = uf.root(i) +    s = uf.size[r] +    v = 0 +    for j in ns[i]: +        if r == uf.root(j): +            v += 1 +    ans[i] = s - v - 1 +write(" ".join(map(str, ans)))