class UnionFind:
    def __init__(self, n) -> None:
        self.n = n
        self.parents = [-1] * n
    
    def find(self, x):
        if (self.parents[x] < 0):
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        
        self.parents[x] += self.parents[y]
        self.parents[y] = x
    
    def issame(self, x, y):
        return self.find(x) == self.find(y)
    
    def count(self, x):
        return -self.parents[self.find(x)]
    
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
    
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]
    
    def __str__(self):
        return '\n'.join('{}: {}'.format(root, self.members(root)) for root in self.roots())

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

uf_friend = UnionFind(n+1)
count = [0] * (n+1)
for i in range(m):
    a, b = map(int, input().split(' '))
    uf_friend.union(a, b)
    count[a] += 1
    count[b] += 1

for i in range(k):
    a, b = map(int, input().split(' '))
    if uf_friend.issame(a, b):
        count[a] += 1
        count[b] += 1

result = [0] * n
for i in range(1, n+1):
    result[i - 1] = uf_friend.count(i) - count[i] - 1

print(*result)
