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)]

import sys;sys.setrecursionlimit(10**9)

class UnionFind():

  def __init__(self,n):

    self.n=[-1]*n

    self.r=[0]*n

  def Find_Root(self,x):

    if self.n[x]<0:

      return x

    else:

      self.n[x]=self.Find_Root(self.n[x])

      return self.n[x]

  def Unite(self,x,y):

    x=self.Find_Root(x)

    y=self.Find_Root(y)

    if x==y:return

    elif self.r[x]>self.r[y]:

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

      self.n[y]=x

    else:

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

      self.n[x]=y

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

        self.r[y]+=1

  def Root_Same(self,x,y):

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

  def Count(self,x):

    return -self.n[self.Find_Root(x)]

u=UnionFind(n)

for a,b in ab:u.Unite(a-1,b-1)

ans=[u.Count(i)-1for i in range(n)]

for a,b in ab:

  if u.Root_Same(a-1,b-1):

    ans[a-1]-=1

    ans[b-1]-=1

for c,d in cd:

  if u.Root_Same(c-1,d-1):

    ans[c-1]-=1

    ans[d-1]-=1

print((*ans))
import sys;sys.setrecursionlimit(10**9)

class UnionFind:

  def __init__(self,n):

    self.n=[-1]*n

    self.r=[0]*n

  def find_root(self,x):

    if self.n[x]<0:

      return x

    else:

      self.n[x]=self.find_root(self.n[x])

      return self.n[x]

  def unite(self,x,y):

    x=self.find_root(x)

    y=self.find_root(y)

    if x==y:return

    elif self.r[x]>self.r[y]:

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

      self.n[y]=x

    else:

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

      self.n[x]=y

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

        self.r[y]+=1

  def root_same(self,x,y):

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

  def count(self,x):

    return -self.n[self.find_root(x)]

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)]

u=UnionFind(n)

for a,b in ab:u.unite(a-1,b-1)

ans=[u.count(i)-1 for i in range(n)]

for a,b in ab:

  ans[a-1]-=1

  ans[b-1]-=1

for c,d in cd:

  if u.root_same(c-1,d-1):

    ans[c-1]-=1

    ans[d-1]-=1

print((*ans))
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)]
import sys

sys.setrecursionlimit(10**9)


class UnionFind:
    def __init__(self, n):
        self.n = [-1] * n
        self.r = [0] * n

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

    def Unite(self, x, y):
        x = self.Find_Root(x)
        y = self.Find_Root(y)
        if x == y:
            return
        elif self.r[x] > self.r[y]:
            self.n[x] += self.n[y]
            self.n[y] = x
        else:
            self.n[y] += self.n[x]
            self.n[x] = y
            if self.r[x] == self.r[y]:
                self.r[y] += 1

    def Root_Same(self, x, y):
        return self.Find_Root(x) == self.Find_Root(y)

    def Count(self, x):
        return -self.n[self.Find_Root(x)]


u = UnionFind(n)
for a, b in ab:
    u.Unite(a - 1, b - 1)
ans = [u.Count(i) - 1 for i in range(n)]
for a, b in ab:
    if u.Root_Same(a - 1, b - 1):
        ans[a - 1] -= 1
        ans[b - 1] -= 1
for c, d in cd:
    if u.Root_Same(c - 1, d - 1):
        ans[c - 1] -= 1
        ans[d - 1] -= 1
print((*ans))

import sys

sys.setrecursionlimit(10**9)


class UnionFind:
    def __init__(self, n):
        self.n = [-1] * n
        self.r = [0] * n

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

    def unite(self, x, y):
        x = self.find_root(x)
        y = self.find_root(y)
        if x == y:
            return
        elif self.r[x] > self.r[y]:
            self.n[x] += self.n[y]
            self.n[y] = x
        else:
            self.n[y] += self.n[x]
            self.n[x] = y
            if self.r[x] == self.r[y]:
                self.r[y] += 1

    def root_same(self, x, y):
        return self.find_root(x) == self.find_root(y)

    def count(self, x):
        return -self.n[self.find_root(x)]


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)]
u = UnionFind(n)
for a, b in ab:
    u.unite(a - 1, b - 1)
ans = [u.count(i) - 1 for i in range(n)]
for a, b in ab:
    ans[a - 1] -= 1
    ans[b - 1] -= 1
for c, d in cd:
    if u.root_same(c - 1, d - 1):
        ans[c - 1] -= 1
        ans[d - 1] -= 1
print((*ans))

-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 Find_Root(self, x): +    def find_root(self, x): -            self.n[x] = self.Find_Root(self.n[x]) +            self.n[x] = self.find_root(self.n[x]) -    def Unite(self, x, y): -        x = self.Find_Root(x) -        y = self.Find_Root(y) +    def unite(self, x, y): +        x = self.find_root(x) +        y = self.find_root(y) -    def Root_Same(self, x, y): -        return self.Find_Root(x) == self.Find_Root(y) +    def root_same(self, x, y): +        return self.find_root(x) == self.find_root(y) -    def Count(self, x): -        return -self.n[self.Find_Root(x)] +    def count(self, x): +        return -self.n[self.find_root(x)] +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)] -    u.Unite(a - 1, b - 1) -ans = [u.Count(i) - 1 for i in range(n)] +    u.unite(a - 1, b - 1) +ans = [u.count(i) - 1 for i in range(n)] -    if u.Root_Same(a - 1, b - 1): -        ans[a - 1] -= 1 -        ans[b - 1] -= 1 +    ans[a - 1] -= 1 +    ans[b - 1] -= 1 -    if u.Root_Same(c - 1, d - 1): +    if u.root_same(c - 1, d - 1):