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

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

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



for _ in range(M):

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

    a, b = a - 1, b - 1

    F[a].append(b)

    F[b].append(a)



for _ in range(K):

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

    c, d = c - 1, d - 1

    B[c].append(d)

    B[d].append(c)





class UnionFind:

    def __init__(self, n):

        self.par = [i for i in 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 union(self, x, y):

        x = self.find(x)

        y = self.find(y)



        if x == y:

            return



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

            self.par[x] = y

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

        else:

            self.par[y] = x

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

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

                self.rank[x] += 1



    # 同じ集合に属するか判定

    def same(self, x, y):

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



    # すべての頂点に対して親を検索する

    def all_find(self):

        for n in range(len(self.par)):

            self.find(n)





UF = UnionFind(N)

for iam in range(N):

    for friend in F[iam]:

        UF.union(iam, friend)



ans = [UF.size[UF.find(iam)] - 1 for iam in range(N)]

for iam in range(N):

    ans[iam] -= len(F[iam])



for iam in range(N):

    for block in B[iam]:

        if UF.same(iam, block):

            ans[iam] -= 1



print(*ans, sep=' ')

class UnionFind():

    def __init__(self,n):

        self.n = n

        self.parents = [-1] * (n+1)



    def FindRoot(self,x):

        if self.parents[x] < 0:

            return x

        else:

            self.parents[x] = self.FindRoot(self.parents[x])

            return self.parents[x]

    

    def Union(self,x,y):

        x = self.FindRoot(x)

        y = self.FindRoot(y)



        if x == y:

            return

        

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

            x, y = y, x

        

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

        self.parents[y] = x



    def isSame(self,x,y):

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



    def Size(self,x):

        return -self.parents[self.FindRoot(x)]



n,m,k = [int(x) for x in input().split()]

obj = UnionFind(n)

cnt = [0]*(n+1)

for _ in range(m):

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

    obj.Union(a,b)

    cnt[a] += 1

    cnt[b] += 1

for _ in range(k):

    c,d = [int(x) for x in input().split()]

    if obj.isSame(c,d):

        cnt[c] += 1

        cnt[d] += 1

ans = 0

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

    ans = obj.Size(i)-1-cnt[i]

    print(ans,end=" ")

N, M, K = map(int, input().split())
F = [[] for _ in range(N)]
B = [[] for _ in range(N)]
for _ in range(M):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    F[a].append(b)
    F[b].append(a)
for _ in range(K):
    c, d = map(int, input().split())
    c, d = c - 1, d - 1
    B[c].append(d)
    B[d].append(c)


class UnionFind:
    def __init__(self, n):
        self.par = [i for i in 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 union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        if x == y:
            return
        if self.rank[x] < self.rank[y]:
            self.par[x] = y
            self.size[y] += self.size[x]
        else:
            self.par[y] = x
            self.size[x] += self.size[y]
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1

    # 同じ集合に属するか判定
    def same(self, x, y):
        return self.find(x) == self.find(y)

    # すべての頂点に対して親を検索する
    def all_find(self):
        for n in range(len(self.par)):
            self.find(n)


UF = UnionFind(N)
for iam in range(N):
    for friend in F[iam]:
        UF.union(iam, friend)
ans = [UF.size[UF.find(iam)] - 1 for iam in range(N)]
for iam in range(N):
    ans[iam] -= len(F[iam])
for iam in range(N):
    for block in B[iam]:
        if UF.same(iam, block):
            ans[iam] -= 1
print(*ans, sep=" ")

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

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

    def Union(self, x, y):
        x = self.FindRoot(x)
        y = self.FindRoot(y)
        if x == y:
            return
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def isSame(self, x, y):
        return self.FindRoot(x) == self.FindRoot(y)

    def Size(self, x):
        return -self.parents[self.FindRoot(x)]


n, m, k = [int(x) for x in input().split()]
obj = UnionFind(n)
cnt = [0] * (n + 1)
for _ in range(m):
    a, b = [int(x) for x in input().split()]
    obj.Union(a, b)
    cnt[a] += 1
    cnt[b] += 1
for _ in range(k):
    c, d = [int(x) for x in input().split()]
    if obj.isSame(c, d):
        cnt[c] += 1
        cnt[d] += 1
ans = 0
for i in range(1, n + 1):
    ans = obj.Size(i) - 1 - cnt[i]
    print(ans, end=" ")

-N, M, K = map(int, input().split()) -F = [[] for _ in range(N)] -B = [[] for _ in range(N)] -for _ in range(M): -    a, b = map(int, input().split()) -    a, b = a - 1, b - 1 -    F[a].append(b) -    F[b].append(a) -for _ in range(K): -    c, d = map(int, input().split()) -    c, d = c - 1, d - 1 -    B[c].append(d) -    B[d].append(c) +class UnionFind: +    def __init__(self, n): +        self.n = n +        self.parents = [-1] * (n + 1) + +    def FindRoot(self, x): +        if self.parents[x] < 0: +            return x +        else: +            self.parents[x] = self.FindRoot(self.parents[x]) +            return self.parents[x] + +    def Union(self, x, y): +        x = self.FindRoot(x) +        y = self.FindRoot(y) +        if x == y: +            return +        if self.parents[x] > self.parents[y]: +            x, y = y, x +        self.parents[x] += self.parents[y] +        self.parents[y] = x + +    def isSame(self, x, y): +        return self.FindRoot(x) == self.FindRoot(y) + +    def Size(self, x): +        return -self.parents[self.FindRoot(x)] -class UnionFind: -    def __init__(self, n): -        self.par = [i for i in 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 union(self, x, y): -        x = self.find(x) -        y = self.find(y) -        if x == y: -            return -        if self.rank[x] < self.rank[y]: -            self.par[x] = y -            self.size[y] += self.size[x] -        else: -            self.par[y] = x -            self.size[x] += self.size[y] -            if self.rank[x] == self.rank[y]: -                self.rank[x] += 1 - -    # 同じ集合に属するか判定 -    def same(self, x, y): -        return self.find(x) == self.find(y) - -    # すべての頂点に対して親を検索する -    def all_find(self): -        for n in range(len(self.par)): -            self.find(n) - - -UF = UnionFind(N) -for iam in range(N): -    for friend in F[iam]: -        UF.union(iam, friend) -ans = [UF.size[UF.find(iam)] - 1 for iam in range(N)] -for iam in range(N): -    ans[iam] -= len(F[iam]) -for iam in range(N): -    for block in B[iam]: -        if UF.same(iam, block): -            ans[iam] -= 1 -print(*ans, sep=" ") +n, m, k = [int(x) for x in input().split()] +obj = UnionFind(n) +cnt = [0] * (n + 1) +for _ in range(m): +    a, b = [int(x) for x in input().split()] +    obj.Union(a, b) +    cnt[a] += 1 +    cnt[b] += 1 +for _ in range(k): +    c, d = [int(x) for x in input().split()] +    if obj.isSame(c, d): +        cnt[c] += 1 +        cnt[d] += 1 +ans = 0 +for i in range(1, n + 1): +    ans = obj.Size(i) - 1 - cnt[i] +    print(ans, end=" ")