from collections import deque, Counter



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

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

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



def dfs(s, c):

    """

    s: node

    c: number

    """



    q = deque()

    q.append(s)

    visited[s] = True

    color[s] = c

    

    while q:

        u = q.pop()

        for v in graph[u]:

            if visited[v]:

                continue

                

            visited[v] = True

            color[v] = c

            q.append(v)





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

for a, b in AB:

    graph[a - 1].append(b - 1)

    graph[b - 1].append(a - 1)



visited = [False] * N

color = [-1] * N

c = 0



for i in range(N):

    if not visited[i]:

        dfs(i, c)

        c += 1

        

ctr = Counter(color)



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

for c, d in CD:

    if color[c - 1] == color[d - 1]:

        block[c - 1].append(d - 1)

        block[d - 1].append(c - 1)



ans = [0] * N

for i in range(N):

    ans[i] = ctr[color[i]] - 1 - len(graph[i]) - len(block[i])

    

print((*ans))



class UnionFind:

    def __init__(self, n):

        self.par = list(range(n))

        self.rank = [0] * n

        self.size = [1] * n



    def find(self, x):

        if self.par[x] == x:

            return x

        else:

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

            return self.par[x]



    def unite(self, x, y):

        x = self.find(x)

        y = self.find(y)



        if x == y:

            return



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

            self.rank[x] += 1

        elif self.rank[x] < self.rank[y]:

            x, y = y, x



        self.par[y] = x

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



    def is_same(self, x, y):

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



    def get_size(self, x):

        return self.size[self.find(x)]





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

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

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



friend = [[] for _ in range(N + 1)]

for a, b in X:

    friend[a].append(b)

    friend[b].append(a)



block = [[] for _ in range(N + 1)]

for c, d in Y:

    block[c].append(d)

    block[d].append(c)



t = UnionFind(N + 1)

for a, b in X:

    t.unite(a, b)



ans = []

for i in range(1, N + 1):

    cnt = t.get_size(i) - len(friend[i]) - 1

    for v in block[i]:

        cnt -= int(t.is_same(i, v))

    ans.append(cnt)



print((*ans))

from collections import deque, Counter

N, M, K = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]
CD = [list(map(int, input().split())) for _ in range(K)]


def dfs(s, c):
    """
    s: node
    c: number
    """
    q = deque()
    q.append(s)
    visited[s] = True
    color[s] = c
    while q:
        u = q.pop()
        for v in graph[u]:
            if visited[v]:
                continue
            visited[v] = True
            color[v] = c
            q.append(v)


graph = [[] for _ in range(N)]
for a, b in AB:
    graph[a - 1].append(b - 1)
    graph[b - 1].append(a - 1)
visited = [False] * N
color = [-1] * N
c = 0
for i in range(N):
    if not visited[i]:
        dfs(i, c)
        c += 1
ctr = Counter(color)
block = [[] for _ in range(N)]
for c, d in CD:
    if color[c - 1] == color[d - 1]:
        block[c - 1].append(d - 1)
        block[d - 1].append(c - 1)
ans = [0] * N
for i in range(N):
    ans[i] = ctr[color[i]] - 1 - len(graph[i]) - len(block[i])
print((*ans))

class UnionFind:
    def __init__(self, n):
        self.par = list(range(n))
        self.rank = [0] * n
        self.size = [1] * n

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

    def unite(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] == self.rank[y]:
            self.rank[x] += 1
        elif self.rank[x] < self.rank[y]:
            x, y = y, x
        self.par[y] = x
        self.size[x] += self.size[y]

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

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


N, M, K = list(map(int, input().split()))
X = [list(map(int, input().split())) for _ in range(M)]
Y = [list(map(int, input().split())) for _ in range(K)]
friend = [[] for _ in range(N + 1)]
for a, b in X:
    friend[a].append(b)
    friend[b].append(a)
block = [[] for _ in range(N + 1)]
for c, d in Y:
    block[c].append(d)
    block[d].append(c)
t = UnionFind(N + 1)
for a, b in X:
    t.unite(a, b)
ans = []
for i in range(1, N + 1):
    cnt = t.get_size(i) - len(friend[i]) - 1
    for v in block[i]:
        cnt -= int(t.is_same(i, v))
    ans.append(cnt)
print((*ans))

-from collections import deque, Counter +class UnionFind: +    def __init__(self, n): +        self.par = list(range(n)) +        self.rank = [0] * n +        self.size = [1] * n + +    def find(self, x): +        if self.par[x] == x: +            return x +        else: +            self.par[x] = self.find(self.par[x]) +            return self.par[x] + +    def unite(self, x, y): +        x = self.find(x) +        y = self.find(y) +        if x == y: +            return +        if self.rank[x] == self.rank[y]: +            self.rank[x] += 1 +        elif self.rank[x] < self.rank[y]: +            x, y = y, x +        self.par[y] = x +        self.size[x] += self.size[y] + +    def is_same(self, x, y): +        return self.find(x) == self.find(y) + +    def get_size(self, x): +        return self.size[self.find(x)] + -AB = [list(map(int, input().split())) for _ in range(M)] -CD = [list(map(int, input().split())) for _ in range(K)] - - -def dfs(s, c): -    """ -    s: node -    c: number -    """ -    q = deque() -    q.append(s) -    visited[s] = True -    color[s] = c -    while q: -        u = q.pop() -        for v in graph[u]: -            if visited[v]: -                continue -            visited[v] = True -            color[v] = c -            q.append(v) - - -graph = [[] for _ in range(N)] -for a, b in AB: -    graph[a - 1].append(b - 1) -    graph[b - 1].append(a - 1) -visited = [False] * N -color = [-1] * N -c = 0 -for i in range(N): -    if not visited[i]: -        dfs(i, c) -        c += 1 -ctr = Counter(color) -block = [[] for _ in range(N)] -for c, d in CD: -    if color[c - 1] == color[d - 1]: -        block[c - 1].append(d - 1) -        block[d - 1].append(c - 1) -ans = [0] * N -for i in range(N): -    ans[i] = ctr[color[i]] - 1 - len(graph[i]) - len(block[i]) +X = [list(map(int, input().split())) for _ in range(M)] +Y = [list(map(int, input().split())) for _ in range(K)] +friend = [[] for _ in range(N + 1)] +for a, b in X: +    friend[a].append(b) +    friend[b].append(a) +block = [[] for _ in range(N + 1)] +for c, d in Y: +    block[c].append(d) +    block[d].append(c) +t = UnionFind(N + 1) +for a, b in X: +    t.unite(a, b) +ans = [] +for i in range(1, N + 1): +    cnt = t.get_size(i) - len(friend[i]) - 1 +    for v in block[i]: +        cnt -= int(t.is_same(i, v)) +    ans.append(cnt)