import sys

sys.setrecursionlimit(2 ** 30)

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



groups = [None] * N

visited = set()



# 連結成分を求める

def dfs(group, i):

  if i in visited:

    return

  

  visited.add(i)

  group.add(i)

  groups[i] = group

  # 他のノード

  for c in graph[i]:

    if not c in visited:

      dfs(group, c)

  



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



friends_count = [0] * N

block_count = [0] * N



for _ in range(M):

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

  a, b = a - 1, b - 1

  friends_count[a] += 1

  friends_count[b] += 1

  graph[a].add(b)

  graph[b].add(a)

  

for i in range(N):

  dfs(set(), i)

      

for _ in range(K):

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

  c, d = c - 1, d - 1

  

  # 同じ連結成分に含まれないブロック関係は無視してok

  if d in groups[c]:

    block_count[c] += 1

    block_count[d] += 1



candidates = []



for i in range(N): 

  candidates.append(

    len(groups[i]) - friends_count[i] - block_count[i] - 1

  )

    

print((' '.join(str(x) for x in candidates)))
from sys import stdin





input = stdin.readline





class UnionFind:

  def __init__(self, n):

    self.par = [i for i in range(n)]

    self.size = [1] * n

    

  def unite(self, a, b):

    a = self.find(a)

    b = self.find(b)

    if a != b:

      if self.size[a] < self.size[b]:

        a, b = b, a

      self.size[a] += self.size[b]

      self.par[b] = a

      

  def is_same(self, a, b):

    return self.find(a) == self.find(b)

  

  def size_of(self, a):

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

    

  def find(self, a):

    if a == self.par[a]:

      return a

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

    return self.par[a]

  

   

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

relation = UnionFind(N)



num_friends = [0] * N



for _ in range(M):

  a, b = [int(x) - 1 for x in input().split()]

  relation.unite(a, b)

  num_friends[a] += 1

  num_friends[b] += 1

  

# 所属するグループ - 友達 - 自分

num_candidates = [

  relation.size_of(i) - num_friends[i] - 1 

  for i in range(N)

]

  

for _ in range(K):

  a, b = [int(x) - 1 for x in input().split()]

  # ブロック関係かつ同じグループなら友達候補から除く

  if relation.is_same(a, b):

    num_candidates[a] -= 1

    num_candidates[b] -= 1

  

print((' '.join(str(num) for num in num_candidates)))

import sys

sys.setrecursionlimit(2**30)
N, M, K = list(map(int, input().split()))
groups = [None] * N
visited = set()
# 連結成分を求める
def dfs(group, i):
    if i in visited:
        return
    visited.add(i)
    group.add(i)
    groups[i] = group
    # 他のノード
    for c in graph[i]:
        if not c in visited:
            dfs(group, c)


graph = [set() for _ in range(N)]
friends_count = [0] * N
block_count = [0] * N
for _ in range(M):
    a, b = list(map(int, input().split()))
    a, b = a - 1, b - 1
    friends_count[a] += 1
    friends_count[b] += 1
    graph[a].add(b)
    graph[b].add(a)
for i in range(N):
    dfs(set(), i)
for _ in range(K):
    c, d = list(map(int, input().split()))
    c, d = c - 1, d - 1
    # 同じ連結成分に含まれないブロック関係は無視してok
    if d in groups[c]:
        block_count[c] += 1
        block_count[d] += 1
candidates = []
for i in range(N):
    candidates.append(len(groups[i]) - friends_count[i] - block_count[i] - 1)
print((" ".join(str(x) for x in candidates)))

from sys import stdin

input = stdin.readline


class UnionFind:
    def __init__(self, n):
        self.par = [i for i in range(n)]
        self.size = [1] * n

    def unite(self, a, b):
        a = self.find(a)
        b = self.find(b)
        if a != b:
            if self.size[a] < self.size[b]:
                a, b = b, a
            self.size[a] += self.size[b]
            self.par[b] = a

    def is_same(self, a, b):
        return self.find(a) == self.find(b)

    def size_of(self, a):
        return self.size[self.find(a)]

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


N, M, K = list(map(int, input().split()))
relation = UnionFind(N)
num_friends = [0] * N
for _ in range(M):
    a, b = [int(x) - 1 for x in input().split()]
    relation.unite(a, b)
    num_friends[a] += 1
    num_friends[b] += 1
# 所属するグループ - 友達 - 自分
num_candidates = [relation.size_of(i) - num_friends[i] - 1 for i in range(N)]
for _ in range(K):
    a, b = [int(x) - 1 for x in input().split()]
    # ブロック関係かつ同じグループなら友達候補から除く
    if relation.is_same(a, b):
        num_candidates[a] -= 1
        num_candidates[b] -= 1
print((" ".join(str(num) for num in num_candidates)))

-import sys +from sys import stdin -sys.setrecursionlimit(2**30) -N, M, K = list(map(int, input().split())) -groups = [None] * N -visited = set() -# 連結成分を求める -def dfs(group, i): -    if i in visited: -        return -    visited.add(i) -    group.add(i) -    groups[i] = group -    # 他のノード -    for c in graph[i]: -        if not c in visited: -            dfs(group, c) +input = stdin.readline -graph = [set() for _ in range(N)] -friends_count = [0] * N -block_count = [0] * N +class UnionFind: +    def __init__(self, n): +        self.par = [i for i in range(n)] +        self.size = [1] * n + +    def unite(self, a, b): +        a = self.find(a) +        b = self.find(b) +        if a != b: +            if self.size[a] < self.size[b]: +                a, b = b, a +            self.size[a] += self.size[b] +            self.par[b] = a + +    def is_same(self, a, b): +        return self.find(a) == self.find(b) + +    def size_of(self, a): +        return self.size[self.find(a)] + +    def find(self, a): +        if a == self.par[a]: +            return a +        self.par[a] = self.find(self.par[a]) +        return self.par[a] + + +N, M, K = list(map(int, input().split())) +relation = UnionFind(N) +num_friends = [0] * N -    a, b = list(map(int, input().split())) -    a, b = a - 1, b - 1 -    friends_count[a] += 1 -    friends_count[b] += 1 -    graph[a].add(b) -    graph[b].add(a) -for i in range(N): -    dfs(set(), i) +    a, b = [int(x) - 1 for x in input().split()] +    relation.unite(a, b) +    num_friends[a] += 1 +    num_friends[b] += 1 +# 所属するグループ - 友達 - 自分 +num_candidates = [relation.size_of(i) - num_friends[i] - 1 for i in range(N)] -    c, d = list(map(int, input().split())) -    c, d = c - 1, d - 1 -    # 同じ連結成分に含まれないブロック関係は無視してok -    if d in groups[c]: -        block_count[c] += 1 -        block_count[d] += 1 -candidates = [] -for i in range(N): -    candidates.append(len(groups[i]) - friends_count[i] - block_count[i] - 1) -print((" ".join(str(x) for x in candidates))) +    a, b = [int(x) - 1 for x in input().split()] +    # ブロック関係かつ同じグループなら友達候補から除く +    if relation.is_same(a, b): +        num_candidates[a] -= 1 +        num_candidates[b] -= 1 +print((" ".join(str(num) for num in num_candidates)))