class UnionFind:



    def __init__(self, n):

        self.p, self.d = [-1] * n, [0] * 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 isSame(self, x, y):

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



    def unite(self, x, y):

        if self.isSame(x, y):

            return

        x, y = self.find(x), self.find(y)



        if self.d[x] > self.d[y]:

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

            self.p[y] = x

        else:

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

            self.p[x] = y

            if self.d[x] == self.d[y]:

                self.d[y] += 1



    def size(self, x):

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





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

Frd, Blk = {i: [] for i in range(N)}, {i: [] for i in range(N)}



uni = UnionFind(N)

for _ in range(M):

    A, B = list(map(int, input().split()))

    uni.unite(A - 1, B - 1)

    Frd[A - 1].append(B - 1)

    Frd[B - 1].append(A - 1)

for _ in range(K):

    C, D = list(map(int, input().split()))

    Blk[C - 1].append(D - 1)

    Blk[D - 1].append(C - 1)



ans = []

for i in range(N):

    nBlk = sum([1 for b in Blk[i] if uni.isSame(i, b)])

    ans.append(str(uni.size(i) - 1 - len(Frd[i]) - nBlk))

print((' '.join(ans)))

class UnionFind:



    def __init__(self, n):

        self.p, self.d = [-1] * n, [0] * 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 isSame(self, x, y):

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



    def unite(self, x, y):

        if self.isSame(x, y):

            return

        x, y = self.find(x), self.find(y)



        if self.d[x] > self.d[y]:

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

            self.p[y] = x

        else:

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

            self.p[x] = y

            if self.d[x] == self.d[y]:

                self.d[y] += 1



    def size(self, x):

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





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

n, u = {i: set() for i in range(N)}, UnionFind(N)

for _ in range(M):

    A, B = list(map(int, input().split()))

    u.unite(A - 1, B - 1)

    n[A - 1].add(B - 1)

    n[B - 1].add(A - 1)

for _ in range(K):

    C, D = list(map(int, input().split()))

    if u.isSame(C - 1, D - 1):

        n[C - 1].add(D - 1)

        n[D - 1].add(C - 1)



print((' '.join([str(u.size(i) - len(n[i]) - 1) for i in range(N)])))

class UnionFind:
    def __init__(self, n):
        self.p, self.d = [-1] * n, [0] * 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 isSame(self, x, y):
        return self.find(x) == self.find(y)

    def unite(self, x, y):
        if self.isSame(x, y):
            return
        x, y = self.find(x), self.find(y)
        if self.d[x] > self.d[y]:
            self.p[x] += self.p[y]
            self.p[y] = x
        else:
            self.p[y] += self.p[x]
            self.p[x] = y
            if self.d[x] == self.d[y]:
                self.d[y] += 1

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


N, M, K = list(map(int, input().split()))
Frd, Blk = {i: [] for i in range(N)}, {i: [] for i in range(N)}
uni = UnionFind(N)
for _ in range(M):
    A, B = list(map(int, input().split()))
    uni.unite(A - 1, B - 1)
    Frd[A - 1].append(B - 1)
    Frd[B - 1].append(A - 1)
for _ in range(K):
    C, D = list(map(int, input().split()))
    Blk[C - 1].append(D - 1)
    Blk[D - 1].append(C - 1)
ans = []
for i in range(N):
    nBlk = sum([1 for b in Blk[i] if uni.isSame(i, b)])
    ans.append(str(uni.size(i) - 1 - len(Frd[i]) - nBlk))
print((" ".join(ans)))

class UnionFind:
    def __init__(self, n):
        self.p, self.d = [-1] * n, [0] * 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 isSame(self, x, y):
        return self.find(x) == self.find(y)

    def unite(self, x, y):
        if self.isSame(x, y):
            return
        x, y = self.find(x), self.find(y)
        if self.d[x] > self.d[y]:
            self.p[x] += self.p[y]
            self.p[y] = x
        else:
            self.p[y] += self.p[x]
            self.p[x] = y
            if self.d[x] == self.d[y]:
                self.d[y] += 1

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


N, M, K = list(map(int, input().split()))
n, u = {i: set() for i in range(N)}, UnionFind(N)
for _ in range(M):
    A, B = list(map(int, input().split()))
    u.unite(A - 1, B - 1)
    n[A - 1].add(B - 1)
    n[B - 1].add(A - 1)
for _ in range(K):
    C, D = list(map(int, input().split()))
    if u.isSame(C - 1, D - 1):
        n[C - 1].add(D - 1)
        n[D - 1].add(C - 1)
print((" ".join([str(u.size(i) - len(n[i]) - 1) for i in range(N)])))

-Frd, Blk = {i: [] for i in range(N)}, {i: [] for i in range(N)} -uni = UnionFind(N) +n, u = {i: set() for i in range(N)}, UnionFind(N) -    uni.unite(A - 1, B - 1) -    Frd[A - 1].append(B - 1) -    Frd[B - 1].append(A - 1) +    u.unite(A - 1, B - 1) +    n[A - 1].add(B - 1) +    n[B - 1].add(A - 1) -    Blk[C - 1].append(D - 1) -    Blk[D - 1].append(C - 1) -ans = [] -for i in range(N): -    nBlk = sum([1 for b in Blk[i] if uni.isSame(i, b)]) -    ans.append(str(uni.size(i) - 1 - len(Frd[i]) - nBlk)) -print((" ".join(ans))) +    if u.isSame(C - 1, D - 1): +        n[C - 1].add(D - 1) +        n[D - 1].add(C - 1) +print((" ".join([str(u.size(i) - len(n[i]) - 1) for i in range(N)])))