import collections



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



friendships = [list(map(int, input().split(' '))) for _ in range(m)]

disses = [list(map(int, input().split(' '))) for _ in range(k)]



parent = [i for i in range(0, n+1)]

sizes = [1 for i in range(0, n+1)]



hd = collections.Counter()

adj = collections.defaultdict(set)



def f(parent, u):

	if parent[u] != u: 

		parent[u] = f(parent, parent[u])

	return parent[u]



for a,b in friendships:



	pa,pb = f(parent, a), f(parent, b)

	

	adj[a].add(b)

	adj[b].add(a)



	if pa != pb:

		if sizes[pa] >= sizes[pb]:

			parent[pb] = pa

			sizes[pa] += sizes[pb]

		else:

			parent[pa] = pb

			sizes[pb] += sizes[pa]



for c,d in disses:

	pc,pd = f(parent, c), f(parent, d)

	if d not in adj[c] and (pc == pd):

		hd[c] += 1

		hd[d] += 1



print(' '.join([str(sizes[f(parent,u)] - len(adj[u]) - hd[u] - 1)  for u in range(1, n+1)]))
import collections



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



friendships = [list(map(int, input().split(' '))) for _ in range(m)]

disses = [list(map(int, input().split(' '))) for _ in range(k)]



parent = [i for i in range(0, n+1)]

sizes = [1 for i in range(0, n+1)]

hd = [1 for i in range(0, n + 1)]





def f(parent, u):

	if parent[u] != u:  parent[u] = f(parent, parent[u])

	return parent[u]



for a,b in friendships:



	pa,pb = f(parent, a), f(parent, b)

	hd[a] +=1

	hd[b] +=1



	if pa != pb:

		if sizes[pa] >= sizes[pb]:

			parent[pb] = pa

			sizes[pa] += sizes[pb]

		else:

			parent[pa] = pb

			sizes[pb] += sizes[pa]



for c,d in disses:

	pc,pd = f(parent, c), f(parent, d)

	if (pc == pd):

		hd[c] += 1

		hd[d] += 1



print(' '.join([str(sizes[f(parent,u)] - hd[u])  for u in range(1, n+1)]))
import collections

n, m, k = list(map(int, input().split(" ")))
friendships = [list(map(int, input().split(" "))) for _ in range(m)]
disses = [list(map(int, input().split(" "))) for _ in range(k)]
parent = [i for i in range(0, n + 1)]
sizes = [1 for i in range(0, n + 1)]
hd = collections.Counter()
adj = collections.defaultdict(set)


def f(parent, u):
    if parent[u] != u:
        parent[u] = f(parent, parent[u])
    return parent[u]


for a, b in friendships:
    pa, pb = f(parent, a), f(parent, b)
    adj[a].add(b)
    adj[b].add(a)
    if pa != pb:
        if sizes[pa] >= sizes[pb]:
            parent[pb] = pa
            sizes[pa] += sizes[pb]
        else:
            parent[pa] = pb
            sizes[pb] += sizes[pa]
for c, d in disses:
    pc, pd = f(parent, c), f(parent, d)
    if d not in adj[c] and (pc == pd):
        hd[c] += 1
        hd[d] += 1
print(
    " ".join(
        [str(sizes[f(parent, u)] - len(adj[u]) - hd[u] - 1) for u in range(1, n + 1)]
    )
)

import collections

n, m, k = list(map(int, input().split(" ")))
friendships = [list(map(int, input().split(" "))) for _ in range(m)]
disses = [list(map(int, input().split(" "))) for _ in range(k)]
parent = [i for i in range(0, n + 1)]
sizes = [1 for i in range(0, n + 1)]
hd = [1 for i in range(0, n + 1)]


def f(parent, u):
    if parent[u] != u:
        parent[u] = f(parent, parent[u])
    return parent[u]


for a, b in friendships:
    pa, pb = f(parent, a), f(parent, b)
    hd[a] += 1
    hd[b] += 1
    if pa != pb:
        if sizes[pa] >= sizes[pb]:
            parent[pb] = pa
            sizes[pa] += sizes[pb]
        else:
            parent[pa] = pb
            sizes[pb] += sizes[pa]
for c, d in disses:
    pc, pd = f(parent, c), f(parent, d)
    if pc == pd:
        hd[c] += 1
        hd[d] += 1
print(" ".join([str(sizes[f(parent, u)] - hd[u]) for u in range(1, n + 1)]))

-hd = collections.Counter() -adj = collections.defaultdict(set) +hd = [1 for i in range(0, n + 1)] -    adj[a].add(b) -    adj[b].add(a) +    hd[a] += 1 +    hd[b] += 1 -    if d not in adj[c] and (pc == pd): +    if pc == pd: -print( -    " ".join( -        [str(sizes[f(parent, u)] - len(adj[u]) - hd[u] - 1) for u in range(1, n + 1)] -    ) -) +print(" ".join([str(sizes[f(parent, u)] - hd[u]) for u in range(1, n + 1)]))