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

par = list(range(N))

siz = [1] * N

n_friend = [0] * N





def root(x):

    if par[x] == x:

        return x

    else:

        par[x] = root(par[x])

        return par[x]





def same(x, y):

    return root(x) == root(y)





def unite(x, y):

    x = root(x)

    y = root(y)

    if x == y:

        return

    if siz[x] > siz[y]:

        x, y = y, x

    siz[y] += siz[x]

    par[x] = y





def tree_size(x):

    return siz[root(x)]





B = {}

for i in range(N):

    B[i] = set()

for _ in range(M):

    p, q = map(int, input().split())

    n_friend[p - 1] += 1

    n_friend[q - 1] += 1

    unite(p - 1, q - 1)

for _ in range(K):

    p, q = map(int, input().split())

    B[p - 1].add(q - 1)

    B[q - 1].add(p - 1)





# calc friend candidate

i, blocked = 0, 0

for b in B[0]:

    if same(i, b):

        blocked += 1

print(tree_size(i) - 1 - n_friend[i] - blocked, end='')

for i in range(1, N):

    print(' ', end='')

    blocked = 0

    for b in B[i]:

        if same(i, b):

            blocked += 1

    print(tree_size(i) - 1 - n_friend[i] - blocked, end='')

print('')

class UnionFind:

    def __init__(self, n):

        self.par = list(range(n))    # self.par[x] = y: xの属する木の根はy

        self.siz = [1] * n



    def root(self, x):

        if self.par[x] == x:

            return x

        else:

            self.par[x] = self.root(self.par[x])

            return self.par[x]



    def same(self, x, y):

        return self.root(x) == self.root(y)



    def unite(self, x, y):

        x = self.root(x)

        y = self.root(y)

        if x == y:

            return

        if self.siz[x] > self.siz[y]:     # 小さい木を大きい木に接続（根までが近くなる）

            x, y = y, x

        self.siz[y] += self.siz[x]

        self.par[x] = y



    def tree_size(self, x):

        return self.siz[self.root(x)]





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

F = UnionFind(N)

n_friend = [0] * N



B = {}

for i in range(N):

    B[i] = set()

for _ in range(M):

    p, q = map(int, input().split())

    n_friend[p - 1] += 1

    n_friend[q - 1] += 1

    F.unite(p - 1, q - 1)

for _ in range(K):

    p, q = map(int, input().split())

    B[p - 1].add(q - 1)

    B[q - 1].add(p - 1)





# calc friend candidate

i, blocked = 0, 0

for b in B[0]:

    if F.same(i, b):

        blocked += 1

print(F.tree_size(i) - 1 - n_friend[i] - blocked, end='')

for i in range(1, N):

    print(' ', end='')

    blocked = 0

    for b in B[i]:

        if F.same(i, b):

            blocked += 1

    print(F.tree_size(i) - 1 - n_friend[i] - blocked, end='')

print('')

N, M, K = map(int, input().split())
par = list(range(N))
siz = [1] * N
n_friend = [0] * N


def root(x):
    if par[x] == x:
        return x
    else:
        par[x] = root(par[x])
        return par[x]


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


def unite(x, y):
    x = root(x)
    y = root(y)
    if x == y:
        return
    if siz[x] > siz[y]:
        x, y = y, x
    siz[y] += siz[x]
    par[x] = y


def tree_size(x):
    return siz[root(x)]


B = {}
for i in range(N):
    B[i] = set()
for _ in range(M):
    p, q = map(int, input().split())
    n_friend[p - 1] += 1
    n_friend[q - 1] += 1
    unite(p - 1, q - 1)
for _ in range(K):
    p, q = map(int, input().split())
    B[p - 1].add(q - 1)
    B[q - 1].add(p - 1)
# calc friend candidate
i, blocked = 0, 0
for b in B[0]:
    if same(i, b):
        blocked += 1
print(tree_size(i) - 1 - n_friend[i] - blocked, end="")
for i in range(1, N):
    print(" ", end="")
    blocked = 0
    for b in B[i]:
        if same(i, b):
            blocked += 1
    print(tree_size(i) - 1 - n_friend[i] - blocked, end="")
print("")

class UnionFind:
    def __init__(self, n):
        self.par = list(range(n))  # self.par[x] = y: xの属する木の根はy
        self.siz = [1] * n

    def root(self, x):
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.root(self.par[x])
            return self.par[x]

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

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        if self.siz[x] > self.siz[y]:  # 小さい木を大きい木に接続（根までが近くなる）
            x, y = y, x
        self.siz[y] += self.siz[x]
        self.par[x] = y

    def tree_size(self, x):
        return self.siz[self.root(x)]


N, M, K = map(int, input().split())
F = UnionFind(N)
n_friend = [0] * N
B = {}
for i in range(N):
    B[i] = set()
for _ in range(M):
    p, q = map(int, input().split())
    n_friend[p - 1] += 1
    n_friend[q - 1] += 1
    F.unite(p - 1, q - 1)
for _ in range(K):
    p, q = map(int, input().split())
    B[p - 1].add(q - 1)
    B[q - 1].add(p - 1)
# calc friend candidate
i, blocked = 0, 0
for b in B[0]:
    if F.same(i, b):
        blocked += 1
print(F.tree_size(i) - 1 - n_friend[i] - blocked, end="")
for i in range(1, N):
    print(" ", end="")
    blocked = 0
    for b in B[i]:
        if F.same(i, b):
            blocked += 1
    print(F.tree_size(i) - 1 - n_friend[i] - blocked, end="")
print("")

-N, M, K = map(int, input().split()) -par = list(range(N)) -siz = [1] * N -n_friend = [0] * N +class UnionFind: +    def __init__(self, n): +        self.par = list(range(n))  # self.par[x] = y: xの属する木の根はy +        self.siz = [1] * n + +    def root(self, x): +        if self.par[x] == x: +            return x +        else: +            self.par[x] = self.root(self.par[x]) +            return self.par[x] + +    def same(self, x, y): +        return self.root(x) == self.root(y) + +    def unite(self, x, y): +        x = self.root(x) +        y = self.root(y) +        if x == y: +            return +        if self.siz[x] > self.siz[y]:  # 小さい木を大きい木に接続（根までが近くなる） +            x, y = y, x +        self.siz[y] += self.siz[x] +        self.par[x] = y + +    def tree_size(self, x): +        return self.siz[self.root(x)] -def root(x): -    if par[x] == x: -        return x -    else: -        par[x] = root(par[x]) -        return par[x] - - -def same(x, y): -    return root(x) == root(y) - - -def unite(x, y): -    x = root(x) -    y = root(y) -    if x == y: -        return -    if siz[x] > siz[y]: -        x, y = y, x -    siz[y] += siz[x] -    par[x] = y - - -def tree_size(x): -    return siz[root(x)] - - +N, M, K = map(int, input().split()) +F = UnionFind(N) +n_friend = [0] * N -    unite(p - 1, q - 1) +    F.unite(p - 1, q - 1) -    if same(i, b): +    if F.same(i, b): -print(tree_size(i) - 1 - n_friend[i] - blocked, end="") +print(F.tree_size(i) - 1 - n_friend[i] - blocked, end="") -        if same(i, b): +        if F.same(i, b): -    print(tree_size(i) - 1 - n_friend[i] - blocked, end="") +    print(F.tree_size(i) - 1 - n_friend[i] - blocked, end="")