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

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

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



def root(x,P):

    l = []

    n = x

    p = P[n]

    while p >= 0:

        l.append(n)

        n = p

        p = P[p]

    for a in l: P[a] = n

    return n



def same(a, b, P): return root(a,P) == root(b,P)



def count(x,P): return -P[root(x,P)]



def unite(a, b, P):

    if count(a,P) < count(b,P): a, b = b, a

    ar = root(a,P)

    br = root(b,P)

    if ar == br: return

    P[ar] += P[br]

    P[br] = ar



Fu = [-1] * N

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

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



for a,b in AB:

    a, b = a-1, b-1

    unite(a,b,Fu)

    F[a].add(b)

    F[b].add(a)

for c,d in CD:

    c, d = c-1, d-1

    B[c].add(d)

    B[d].add(c)



for i in range(N):

    block = 0

    for b in B[i]:

        if same(i,b,Fu): block += 1

    print(count(i,Fu) - len(F[i]) - block - 1, end=' ')

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 = map(int, input().split())
AB = [tuple(map(int, input().split())) for _ in range(M)]
CD = [tuple(map(int, input().split())) for _ in range(K)]


def root(x, P):
    l = []
    n = x
    p = P[n]
    while p >= 0:
        l.append(n)
        n = p
        p = P[p]
    for a in l:
        P[a] = n
    return n


def same(a, b, P):
    return root(a, P) == root(b, P)


def count(x, P):
    return -P[root(x, P)]


def unite(a, b, P):
    if count(a, P) < count(b, P):
        a, b = b, a
    ar = root(a, P)
    br = root(b, P)
    if ar == br:
        return
    P[ar] += P[br]
    P[br] = ar


Fu = [-1] * N
F = [set() for _ in range(N)]
B = [set() for _ in range(N)]
for a, b in AB:
    a, b = a - 1, b - 1
    unite(a, b, Fu)
    F[a].add(b)
    F[b].add(a)
for c, d in CD:
    c, d = c - 1, d - 1
    B[c].add(d)
    B[d].add(c)
for i in range(N):
    block = 0
    for b in B[i]:
        if same(i, b, Fu):
            block += 1
    print(count(i, Fu) - len(F[i]) - block - 1, end=" ")

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 = map(int, input().split()) -AB = [tuple(map(int, input().split())) for _ in range(M)] -CD = [tuple(map(int, input().split())) for _ in range(K)] +N, M, K = list(map(int, input().split())) -def root(x, P): -    l = [] -    n = x -    p = P[n] -    while p >= 0: -        l.append(n) -        n = p -        p = P[p] -    for a in l: -        P[a] = n -    return n +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 -def same(a, b, P): -    return root(a, P) == root(b, P) - - -def count(x, P): -    return -P[root(x, P)] - - -def unite(a, b, P): -    if count(a, P) < count(b, P): -        a, b = b, a -    ar = root(a, P) -    br = root(b, P) -    if ar == br: -        return -    P[ar] += P[br] -    P[br] = ar - - -Fu = [-1] * N -F = [set() for _ in range(N)] -B = [set() for _ in range(N)] -for a, b in AB: +friend_or_block = [set() for _ in range(N)] +friends_chain = UnionFindTree(N) +for _ in range(M): +    a, b = list(map(int, input().split())) -    unite(a, b, Fu) -    F[a].add(b) -    F[b].add(a) -for c, d in CD: +    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())) -    B[c].add(d) -    B[d].add(c) -for i in range(N): -    block = 0 -    for b in B[i]: -        if same(i, b, Fu): -            block += 1 -    print(count(i, Fu) - len(F[i]) - block - 1, end=" ") +    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) +                ], +            ) +        ) +    ) +)