class UnionFind:

    def __init__(self, n):

        self.d = []

        for _ in range(n):

            self.d.append(-1)



    def find(self, x):

        if self.d[x] < 0:

            return x

        else:

            self.d[x] = self.find(self.d[x])

            return self.d[x]



    def unite(self, x, y):

        x = self.find(x)

        y = self.find(y)

        if x == y:

            return False

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

            x, y = y, x

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

        self.d[y] = x

        return True



    def same(self, x, y):

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

    

    def size(self, x):

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



n, m, k = map(int, input().split())

uf = UnionFind(n)

dame = [set() for _ in range(n)]



for i in range(m):

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

    a -= 1

    b -= 1

    uf.unite(a, b)

    dame[a].add(b)

    dame[b].add(a)



for i in range(k):

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

    c -= 1

    d -= 1

    if not uf.same(c, d):

        continue

    dame[c].add(d)

    dame[d].add(c)



for i in range(n):

    ans = uf.size(i) - 1

    ans -= len(dame[i])

    print(ans, end=" ")

class UnionFind:



    def __init__(self, n):

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

    

    def find(self, x):

        if self.d[x] < 0:

            return x

        else:

            self.d[x] = self.find(self.d[x])

            return self.d[x]



    def union(self, x, y):

        x = self.find(x)

        y = self.find(y)

        if x == y:

            return False

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

            x, y = y, x

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

        self.d[y] = x

        return True

    

    def same(self, x, y):

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

    

    def size(self, x):

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



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

dame = [[] for _ in range(N)]

uf = UnionFind(N)

for i in range(M):

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

    a -= 1

    b -= 1

    uf.union(a, b)

    dame[a].append(b)

    dame[b].append(a)



for i in range(K):

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

    c -= 1

    d -= 1

    if not uf.same(c, d):

        continue

    dame[c].append(d)

    dame[d].append(c)



for i in range(N):

    ans = uf.size(i) - 1

    ans -= len(dame[i])

    print(ans, end=" ")



print()



class UnionFind:
    def __init__(self, n):
        self.d = []
        for _ in range(n):
            self.d.append(-1)

    def find(self, x):
        if self.d[x] < 0:
            return x
        else:
            self.d[x] = self.find(self.d[x])
            return self.d[x]

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False
        if self.d[x] > self.d[y]:
            x, y = y, x
        self.d[x] = self.d[x] + self.d[y]
        self.d[y] = x
        return True

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

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


n, m, k = map(int, input().split())
uf = UnionFind(n)
dame = [set() for _ in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    uf.unite(a, b)
    dame[a].add(b)
    dame[b].add(a)
for i in range(k):
    c, d = map(int, input().split())
    c -= 1
    d -= 1
    if not uf.same(c, d):
        continue
    dame[c].add(d)
    dame[d].add(c)
for i in range(n):
    ans = uf.size(i) - 1
    ans -= len(dame[i])
    print(ans, end=" ")

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

    def find(self, x):
        if self.d[x] < 0:
            return x
        else:
            self.d[x] = self.find(self.d[x])
            return self.d[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return False
        if self.d[x] > self.d[y]:
            x, y = y, x
        self.d[x] += self.d[y]
        self.d[y] = x
        return True

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

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


N, M, K = map(int, input().split())
dame = [[] for _ in range(N)]
uf = UnionFind(N)
for i in range(M):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    uf.union(a, b)
    dame[a].append(b)
    dame[b].append(a)
for i in range(K):
    c, d = map(int, input().split())
    c -= 1
    d -= 1
    if not uf.same(c, d):
        continue
    dame[c].append(d)
    dame[d].append(c)
for i in range(N):
    ans = uf.size(i) - 1
    ans -= len(dame[i])
    print(ans, end=" ")
print()

-        self.d = [] -        for _ in range(n): -            self.d.append(-1) +        self.d = [-1 for _ in range(n)] -    def unite(self, x, y): +    def union(self, x, y): -        self.d[x] = self.d[x] + self.d[y] +        self.d[x] += self.d[y] -n, m, k = map(int, input().split()) -uf = UnionFind(n) -dame = [set() for _ in range(n)] -for i in range(m): +N, M, K = map(int, input().split()) +dame = [[] for _ in range(N)] +uf = UnionFind(N) +for i in range(M): -    uf.unite(a, b) -    dame[a].add(b) -    dame[b].add(a) -for i in range(k): +    uf.union(a, b) +    dame[a].append(b) +    dame[b].append(a) +for i in range(K): -    dame[c].add(d) -    dame[d].add(c) -for i in range(n): +    dame[c].append(d) +    dame[d].append(c) +for i in range(N): +print()