# coding: utf-8

from sys import setrecursionlimit





def dfs(node: int):

    if checked[node]:

        return



    checked[node] = True

    chain.add(node)

    for n in friends[node]:

        dfs(n)





def solve(*args: str) -> str:

    setrecursionlimit(2 * 10 ** 9)

    n, m, k = list(map(int, args[0].split()))



    global friends

    friends = {i: set() for i in range(n+1)}

    blocked = {i: set() for i in range(n+1)}



    for a, b in map(str.split, args[1:1+m]):

        friends[int(a)].add(int(b))

        friends[int(b)].add(int(a))



    for c, d in map(str.split, args[1+m:1+m+k]):

        blocked[int(c)].add(int(d))

        blocked[int(d)].add(int(c))



    global checked

    checked = [False]*(n+1)



    ret = [0]*(n+1)

    for a in range(1, n+1):

        if checked[a]:

            continue



        global chain

        chain = set()

        dfs(a)

        count = len(chain) - 1

        for i in chain:

            ret[i] += count - len(chain & (friends[i] | blocked[i]))



    return ' '.join(map(str, ret[1:]))





if __name__ == "__main__":

    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8





def solve(*args: str) -> str:

    n, m, k = list(map(int, args[0].split()))



    friends = [set() for _ in range(n+1)]

    blocked = [set() for _ in range(n+1)]



    for a, b in map(str.split, args[1:1+m]):

        friends[int(a)].add(int(b))

        friends[int(b)].add(int(a))



    for c, d in map(str.split, args[1+m:1+m+k]):

        blocked[int(c)].add(int(d))

        blocked[int(d)].add(int(c))



    checked = set()



    ret = [0]*(n+1)

    for a in range(1, n+1):

        if a in checked:

            continue



        chain = set()



        stack = list(friends[a])

        while stack:

            b = stack.pop()

            if b in checked:

                continue



            checked.add(b)

            chain.add(b)

            stack.extend(friends[b])



        count = len(chain) - 1

        for i in chain:

            ret[i] += count - len(chain & (friends[i] | blocked[i]))



    return ' '.join(map(str, ret[1:]))





if __name__ == "__main__":

    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8
from sys import setrecursionlimit


def dfs(node: int):
    if checked[node]:
        return
    checked[node] = True
    chain.add(node)
    for n in friends[node]:
        dfs(n)


def solve(*args: str) -> str:
    setrecursionlimit(2 * 10**9)
    n, m, k = list(map(int, args[0].split()))
    global friends
    friends = {i: set() for i in range(n + 1)}
    blocked = {i: set() for i in range(n + 1)}
    for a, b in map(str.split, args[1 : 1 + m]):
        friends[int(a)].add(int(b))
        friends[int(b)].add(int(a))
    for c, d in map(str.split, args[1 + m : 1 + m + k]):
        blocked[int(c)].add(int(d))
        blocked[int(d)].add(int(c))
    global checked
    checked = [False] * (n + 1)
    ret = [0] * (n + 1)
    for a in range(1, n + 1):
        if checked[a]:
            continue
        global chain
        chain = set()
        dfs(a)
        count = len(chain) - 1
        for i in chain:
            ret[i] += count - len(chain & (friends[i] | blocked[i]))
    return " ".join(map(str, ret[1:]))


if __name__ == "__main__":
    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8
def solve(*args: str) -> str:
    n, m, k = list(map(int, args[0].split()))
    friends = [set() for _ in range(n + 1)]
    blocked = [set() for _ in range(n + 1)]
    for a, b in map(str.split, args[1 : 1 + m]):
        friends[int(a)].add(int(b))
        friends[int(b)].add(int(a))
    for c, d in map(str.split, args[1 + m : 1 + m + k]):
        blocked[int(c)].add(int(d))
        blocked[int(d)].add(int(c))
    checked = set()
    ret = [0] * (n + 1)
    for a in range(1, n + 1):
        if a in checked:
            continue
        chain = set()
        stack = list(friends[a])
        while stack:
            b = stack.pop()
            if b in checked:
                continue
            checked.add(b)
            chain.add(b)
            stack.extend(friends[b])
        count = len(chain) - 1
        for i in chain:
            ret[i] += count - len(chain & (friends[i] | blocked[i]))
    return " ".join(map(str, ret[1:]))


if __name__ == "__main__":
    print((solve(*(open(0).read().splitlines()))))

-from sys import setrecursionlimit - - -def dfs(node: int): -    if checked[node]: -        return -    checked[node] = True -    chain.add(node) -    for n in friends[node]: -        dfs(n) - - -    setrecursionlimit(2 * 10**9) -    global friends -    friends = {i: set() for i in range(n + 1)} -    blocked = {i: set() for i in range(n + 1)} +    friends = [set() for _ in range(n + 1)] +    blocked = [set() for _ in range(n + 1)] -    global checked -    checked = [False] * (n + 1) +    checked = set() -        if checked[a]: +        if a in checked: -        global chain -        dfs(a) +        stack = list(friends[a]) +        while stack: +            b = stack.pop() +            if b in checked: +                continue +            checked.add(b) +            chain.add(b) +            stack.extend(friends[b])