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



class UnionFindTree:

    def __init__(self, n):

        self.parent = [-1 for _ in range(n)]



    def root(self, x):

        p, seq = self.parent[x], list()

        while p >= 0:

            seq.append(x)

            x, p = p, self.parent[p]

        for c in seq: self.parent[c] = x

        return x



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



    def count(self, x): return -self.parent[self.root(x)]



    def unite(self, x, y):

        if self.count(x) < self.count(y): x, y = y, x

        xr, yr = self.root(x), self.root(y)

        if xr == yr: return

        self.parent[xr] += self.parent[yr]

        self.parent[yr] = xr



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

friends_chain = UnionFindTree(N)



for _ in range(M):

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

    a, b = a-1, b-1

    friends_chain.unite(a, b)

    friend_or_block[a].add(b)

    friend_or_block[b].add(a)



for _ in range(K):

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

    c, d = c-1, d-1

    if friends_chain.same(c, d):

        friend_or_block[c].add(d)

        friend_or_block[d].add(c)



print((' '.join(map(str, [friends_chain.count(i) - len(friend_or_block[i]) - 1 for i in range(N)]))))

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



class UnionFindTree:

    def __init__(self, n):

        self.parent = [-1 for _ in range(n)]



    def root(self, x):

        p, seq = self.parent[x], list()

        while p >= 0:

            seq.append(x)

            x, p = p, self.parent[p]

        for c in seq: self.parent[c] = x

        return x



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



    def count(self, x): return -self.parent[self.root(x)]



    def unite(self, x, y):

        if self.count(x) < self.count(y): x, y = y, x

        xr, yr = self.root(x), self.root(y)

        if xr == yr: return

        self.parent[xr] += self.parent[yr]

        self.parent[yr] = xr



friend_or_block = [0 for _ in range(N)]

friends_chain = UnionFindTree(N)



for _ in range(M):

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

    a, b = a-1, b-1

    friends_chain.unite(a, b)

    friend_or_block[a] += 1

    friend_or_block[b] += 1



for _ in range(K):

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

    c, d = c-1, d-1

    if friends_chain.same(c, d):

        friend_or_block[c] += 1

        friend_or_block[d] += 1



print((' '.join(map(str, [friends_chain.count(i) - friend_or_block[i] - 1 for i in range(N)]))))

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


class UnionFindTree:
    def __init__(self, n):
        self.parent = [-1 for _ in range(n)]

    def root(self, x):
        p, seq = self.parent[x], list()
        while p >= 0:
            seq.append(x)
            x, p = p, self.parent[p]
        for c in seq:
            self.parent[c] = x
        return x

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

    def count(self, x):
        return -self.parent[self.root(x)]

    def unite(self, x, y):
        if self.count(x) < self.count(y):
            x, y = y, x
        xr, yr = self.root(x), self.root(y)
        if xr == yr:
            return
        self.parent[xr] += self.parent[yr]
        self.parent[yr] = xr


friend_or_block = [set() for _ in range(N)]
friends_chain = UnionFindTree(N)
for _ in range(M):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    friends_chain.unite(a, b)
    friend_or_block[a].add(b)
    friend_or_block[b].add(a)
for _ in range(K):
    c, d = list(map(int, input().split()))
    c, d = c - 1, d - 1
    if friends_chain.same(c, d):
        friend_or_block[c].add(d)
        friend_or_block[d].add(c)
print(
    (
        " ".join(
            map(
                str,
                [
                    friends_chain.count(i) - len(friend_or_block[i]) - 1
                    for i in range(N)
                ],
            )
        )
    )
)

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


class UnionFindTree:
    def __init__(self, n):
        self.parent = [-1 for _ in range(n)]

    def root(self, x):
        p, seq = self.parent[x], list()
        while p >= 0:
            seq.append(x)
            x, p = p, self.parent[p]
        for c in seq:
            self.parent[c] = x
        return x

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

    def count(self, x):
        return -self.parent[self.root(x)]

    def unite(self, x, y):
        if self.count(x) < self.count(y):
            x, y = y, x
        xr, yr = self.root(x), self.root(y)
        if xr == yr:
            return
        self.parent[xr] += self.parent[yr]
        self.parent[yr] = xr


friend_or_block = [0 for _ in range(N)]
friends_chain = UnionFindTree(N)
for _ in range(M):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    friends_chain.unite(a, b)
    friend_or_block[a] += 1
    friend_or_block[b] += 1
for _ in range(K):
    c, d = list(map(int, input().split()))
    c, d = c - 1, d - 1
    if friends_chain.same(c, d):
        friend_or_block[c] += 1
        friend_or_block[d] += 1
print(
    (
        " ".join(
            map(
                str, [friends_chain.count(i) - friend_or_block[i] - 1 for i in range(N)]
            )
        )
    )
)

-friend_or_block = [set() for _ in range(N)] +friend_or_block = [0 for _ in range(N)] -    friend_or_block[a].add(b) -    friend_or_block[b].add(a) +    friend_or_block[a] += 1 +    friend_or_block[b] += 1 -        friend_or_block[c].add(d) -        friend_or_block[d].add(c) +        friend_or_block[c] += 1 +        friend_or_block[d] += 1 -                str, -                [ -                    friends_chain.count(i) - len(friend_or_block[i]) - 1 -                    for i in range(N) -                ], +                str, [friends_chain.count(i) - friend_or_block[i] - 1 for i in range(N)]