def main():

  import sys

  sys.setrecursionlimit(10**5+10)

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

  class UnionFind:

      def __init__(self, N):

          self.par = [-1 for i in range(N+1)]

          self.rank = [1]*(N+1)



      def find(self, x):

          if self.par[x] < 0:

              return x

          else:

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

              return self.par[x]



      def same_check(self, x, y):

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



      def union(self, x, y):

          x = self.find(x)

          y = self.find(y)



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

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

              self.par[y] = x

          else:

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

              self.par[x] = y

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

                  self.rank[x] += 1



  UF = UnionFind(N)

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

  for n in range(M):

      A, B = list(map(int,input().split()))

      friendlist[A].append(B)

      friendlist[B].append(A)

      if not UF.same_check(A,B):

          UF.union(A, B)

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

  for n in range(K):

      C, D = list(map(int, input().split()))

      blocklist[C].append(D)

      blocklist[D].append(C)



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

      root = UF.find(person)

      ans = -UF.par[root]-1

      ans -= len(friendlist[person])

      for l in blocklist[person]:

          if UF.same_check(person,l):

              ans -= 1

      print(ans)



if __name__ == '__main__':

  main()

from collections import deque

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

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

for n in range(M):

    A, B = list(map(int,input().split()))

    friendlist[A].append(B)

    friendlist[B].append(A)



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

for n in range(K):

    C, D = list(map(int, input().split()))

    blocklist[C].append(D)

    blocklist[D].append(C)



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

visited = [-1] * (N+1)

d = deque()

leaderdic = {}

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

    d.append(person)

    leader = person

    cnt = 0

    while len(d)>0:

        nowwho = d.popleft()

        if whatgroup[nowwho] != -1:

            continue

        d.extend(friendlist[nowwho])

        whatgroup[nowwho] = leader

        cnt += 1

    if cnt != 0:

        leaderdic[leader] = cnt

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

    ans = leaderdic[whatgroup[person]]

    ans -= 1

    ans -= len(friendlist[person])

    for block in blocklist[person]:

        if whatgroup[person]==whatgroup[block]:

            ans -= 1

    print(ans)
def main():
    import sys

    sys.setrecursionlimit(10**5 + 10)
    N, M, K = list(map(int, input().split()))

    class UnionFind:
        def __init__(self, N):
            self.par = [-1 for i in range(N + 1)]
            self.rank = [1] * (N + 1)

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

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

        def union(self, x, y):
            x = self.find(x)
            y = self.find(y)
            if self.rank[x] > self.rank[y]:
                self.par[x] += self.par[y]
                self.par[y] = x
            else:
                self.par[y] += self.par[x]
                self.par[x] = y
                if self.rank[x] == self.rank[y]:
                    self.rank[x] += 1

    UF = UnionFind(N)
    friendlist = [[] for _ in range(N + 1)]
    for n in range(M):
        A, B = list(map(int, input().split()))
        friendlist[A].append(B)
        friendlist[B].append(A)
        if not UF.same_check(A, B):
            UF.union(A, B)
    blocklist = [[] for _ in range(N + 1)]
    for n in range(K):
        C, D = list(map(int, input().split()))
        blocklist[C].append(D)
        blocklist[D].append(C)
    for person in range(1, N + 1):
        root = UF.find(person)
        ans = -UF.par[root] - 1
        ans -= len(friendlist[person])
        for l in blocklist[person]:
            if UF.same_check(person, l):
                ans -= 1
        print(ans)


if __name__ == "__main__":
    main()

from collections import deque

N, M, K = list(map(int, input().split()))
friendlist = [[] for _ in range(N + 1)]
for n in range(M):
    A, B = list(map(int, input().split()))
    friendlist[A].append(B)
    friendlist[B].append(A)
blocklist = [[] for _ in range(N + 1)]
for n in range(K):
    C, D = list(map(int, input().split()))
    blocklist[C].append(D)
    blocklist[D].append(C)
whatgroup = [-1 for _ in range(N + 1)]
visited = [-1] * (N + 1)
d = deque()
leaderdic = {}
for person in range(1, N + 1):
    d.append(person)
    leader = person
    cnt = 0
    while len(d) > 0:
        nowwho = d.popleft()
        if whatgroup[nowwho] != -1:
            continue
        d.extend(friendlist[nowwho])
        whatgroup[nowwho] = leader
        cnt += 1
    if cnt != 0:
        leaderdic[leader] = cnt
for person in range(1, N + 1):
    ans = leaderdic[whatgroup[person]]
    ans -= 1
    ans -= len(friendlist[person])
    for block in blocklist[person]:
        if whatgroup[person] == whatgroup[block]:
            ans -= 1
    print(ans)

-def main(): -    import sys +from collections import deque -    sys.setrecursionlimit(10**5 + 10) -    N, M, K = list(map(int, input().split())) - -    class UnionFind: -        def __init__(self, N): -            self.par = [-1 for i in range(N + 1)] -            self.rank = [1] * (N + 1) - -        def find(self, x): -            if self.par[x] < 0: -                return x -            else: -                self.par[x] = self.find(self.par[x]) -                return self.par[x] - -        def same_check(self, x, y): -            return self.find(x) == self.find(y) - -        def union(self, x, y): -            x = self.find(x) -            y = self.find(y) -            if self.rank[x] > self.rank[y]: -                self.par[x] += self.par[y] -                self.par[y] = x -            else: -                self.par[y] += self.par[x] -                self.par[x] = y -                if self.rank[x] == self.rank[y]: -                    self.rank[x] += 1 - -    UF = UnionFind(N) -    friendlist = [[] for _ in range(N + 1)] -    for n in range(M): -        A, B = list(map(int, input().split())) -        friendlist[A].append(B) -        friendlist[B].append(A) -        if not UF.same_check(A, B): -            UF.union(A, B) -    blocklist = [[] for _ in range(N + 1)] -    for n in range(K): -        C, D = list(map(int, input().split())) -        blocklist[C].append(D) -        blocklist[D].append(C) -    for person in range(1, N + 1): -        root = UF.find(person) -        ans = -UF.par[root] - 1 -        ans -= len(friendlist[person]) -        for l in blocklist[person]: -            if UF.same_check(person, l): -                ans -= 1 -        print(ans) - - -if __name__ == "__main__": -    main() +N, M, K = list(map(int, input().split())) +friendlist = [[] for _ in range(N + 1)] +for n in range(M): +    A, B = list(map(int, input().split())) +    friendlist[A].append(B) +    friendlist[B].append(A) +blocklist = [[] for _ in range(N + 1)] +for n in range(K): +    C, D = list(map(int, input().split())) +    blocklist[C].append(D) +    blocklist[D].append(C) +whatgroup = [-1 for _ in range(N + 1)] +visited = [-1] * (N + 1) +d = deque() +leaderdic = {} +for person in range(1, N + 1): +    d.append(person) +    leader = person +    cnt = 0 +    while len(d) > 0: +        nowwho = d.popleft() +        if whatgroup[nowwho] != -1: +            continue +        d.extend(friendlist[nowwho]) +        whatgroup[nowwho] = leader +        cnt += 1 +    if cnt != 0: +        leaderdic[leader] = cnt +for person in range(1, N + 1): +    ans = leaderdic[whatgroup[person]] +    ans -= 1 +    ans -= len(friendlist[person]) +    for block in blocklist[person]: +        if whatgroup[person] == whatgroup[block]: +            ans -= 1 +    print(ans)