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

        self.c = None



    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:

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

            self.p[rx] = ry



    def count_member(self, x):

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





uf = UnionFind(n)



ab = []

for i in range(m):

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

    ab.append((a, b))

    uf.union(a, b)



cd = [list([int(x)-1 for x in input().split()]) for _ in range(k)]

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



for a, b in ab:

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

        ans[a] -= 1

        ans[b] -= 1



for c, d in cd:

    if uf.find(c) == uf.find(d):

        ans[c] -= 1

        ans[d] -= 1



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))

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
        self.c = None

    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:
            self.p[ry] += self.p[rx]
            self.p[rx] = ry

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


uf = UnionFind(n)
ab = []
for i in range(m):
    a, b = [int(x) - 1 for x in input().split()]
    ab.append((a, b))
    uf.union(a, b)
cd = [list([int(x) - 1 for x in input().split()]) for _ in range(k)]
ans = [uf.count_member(i) - 1 for i in range(n)]
for a, b in ab:
    if uf.find(a) == uf.find(b):
        ans[a] -= 1
        ans[b] -= 1
for c, d in cd:
    if uf.find(c) == uf.find(d):
        ans[c] -= 1
        ans[d] -= 1
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))

-        self.c = None +        # union by rank +        self.r = [1] * n +            if self.r[rx] > self.r[ry]: +                rx, ry = ry, rx +            if self.r[rx] == self.r[ry]: +                self.r[ry] += 1 + +    def same(self, x, y): +        return self.find(x) == self.find(y) -for i in range(m): +cd = [] +for _ in range(m): -cd = [list([int(x) - 1 for x in input().split()]) for _ in range(k)] +for _ in range(k): +    c, d = [int(x) - 1 for x in input().split()] +    cd.append((c, d)) -    if uf.find(a) == uf.find(b): +    if uf.same(a, b): -    if uf.find(c) == uf.find(d): +    if uf.same(c, d):