import sys

sys.setrecursionlimit(4100000)



#Union Findデータ構造

class UnionFind:

    def __init__(self, n):

        #Data: 正:親要素のノード番号, 負:サイズ

        self.D = [-1 for i in range(n)]

    

    def find(self, x:int)->int:

        if self.D[x] < 0:

            return x

        else:

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

            return self.D[x]



    

    def unite(self, x:int, y:int)->bool:

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

        if x == y:

            return False

        else:

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

                self.D[x], self.D[y] = self.D[y], self.D[x]

            else:

                pass

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

            self.D[y] = x

            return True



    def same(self, x:int, y:int)->bool:

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



    def size(self, x:int)->int:

        return -self.D[self.find(x)]



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



uf = UnionFind(n)  



CF = [0] * n #Count Friend

for i in range(m):

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

    a -= 1

    b -= 1

    CF[a] += 1

    CF[b] += 1

    uf.unite(a, b)



CBinG = [0] * n #Count Block in Group

for i in range(k):

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

    c -= 1

    d -= 1

    if uf.same(c, d) == True:

        CBinG[c] += 1

        CBinG[d] += 1

    else:

        pass

    

for i in range(n):

    ans = uf.size(i) - 1 - CF[i] - CBinG[i]

    print(ans, end=' ')



import sys

sys.setrecursionlimit(4100000)



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



F = [[] for i in range(n)]   #Friend list

for i in range(m):

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

    a, b = a-1, b-1

    F[a].append(b)

    F[b].append(a)





gnum = 1    #group number

#DFS

def DFS_func(a:int, gnum:int):   #Target, Data

        if G[a] == 0:

            G[a] = gnum

            for i in range(len(F[a])):

                DFS_func(F[a][i], gnum)

        else:

            pass

G = [0 for i in range(n)]   #it has Group numbers       

for i in range(n):

    if G[i] == 0:

        DFS_func(i, gnum)

        gnum += 1

    else:

        pass



B = [0 for i in range(n)]   #How many Blocks in the same Group

for i in range(k):

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

    c, d = c-1, d-1

    if G[c] == G[d]:

        B[c] , B[d] = B[c]+1, B[d]+1

    else:

        pass



GS = [0 for i in range(gnum)]   #Group Size

for i in range(n):

    GS[G[i]] += 1



for i in range(n):

    if G[i] == 0:

        ans = 0

    else:

        ans = GS[G[i]]-len(F[i])-B[i]-1

    print(ans, end = ' ')

import sys

sys.setrecursionlimit(4100000)
# Union Findデータ構造
class UnionFind:
    def __init__(self, n):
        # Data: 正:親要素のノード番号, 負:サイズ
        self.D = [-1 for i in range(n)]

    def find(self, x: int) -> int:
        if self.D[x] < 0:
            return x
        else:
            self.D[x] = self.find(self.D[x])
            return self.D[x]

    def unite(self, x: int, y: int) -> bool:
        x, y = self.find(x), self.find(y)
        if x == y:
            return False
        else:
            if self.D[x] > self.D[y]:
                self.D[x], self.D[y] = self.D[y], self.D[x]
            else:
                pass
            self.D[x] += self.D[y]
            self.D[y] = x
            return True

    def same(self, x: int, y: int) -> bool:
        return self.find(x) == self.find(y)

    def size(self, x: int) -> int:
        return -self.D[self.find(x)]


n, m, k = map(int, input().split())
uf = UnionFind(n)
CF = [0] * n  # Count Friend
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    CF[a] += 1
    CF[b] += 1
    uf.unite(a, b)
CBinG = [0] * n  # Count Block in Group
for i in range(k):
    c, d = map(int, input().split())
    c -= 1
    d -= 1
    if uf.same(c, d) == True:
        CBinG[c] += 1
        CBinG[d] += 1
    else:
        pass
for i in range(n):
    ans = uf.size(i) - 1 - CF[i] - CBinG[i]
    print(ans, end=" ")

import sys

sys.setrecursionlimit(4100000)
n, m, k = map(int, input().split())
F = [[] for i in range(n)]  # Friend list
for i in range(m):
    a, b = map(int, input().split())
    a, b = a - 1, b - 1
    F[a].append(b)
    F[b].append(a)
gnum = 1  # group number
# DFS
def DFS_func(a: int, gnum: int):  # Target, Data
    if G[a] == 0:
        G[a] = gnum
        for i in range(len(F[a])):
            DFS_func(F[a][i], gnum)
    else:
        pass


G = [0 for i in range(n)]  # it has Group numbers
for i in range(n):
    if G[i] == 0:
        DFS_func(i, gnum)
        gnum += 1
    else:
        pass
B = [0 for i in range(n)]  # How many Blocks in the same Group
for i in range(k):
    c, d = map(int, input().split())
    c, d = c - 1, d - 1
    if G[c] == G[d]:
        B[c], B[d] = B[c] + 1, B[d] + 1
    else:
        pass
GS = [0 for i in range(gnum)]  # Group Size
for i in range(n):
    GS[G[i]] += 1
for i in range(n):
    if G[i] == 0:
        ans = 0
    else:
        ans = GS[G[i]] - len(F[i]) - B[i] - 1
    print(ans, end=" ")

-# Union Findデータ構造 -class UnionFind: -    def __init__(self, n): -        # Data: 正:親要素のノード番号, 負:サイズ -        self.D = [-1 for i in range(n)] - -    def find(self, x: int) -> int: -        if self.D[x] < 0: -            return x -        else: -            self.D[x] = self.find(self.D[x]) -            return self.D[x] - -    def unite(self, x: int, y: int) -> bool: -        x, y = self.find(x), self.find(y) -        if x == y: -            return False -        else: -            if self.D[x] > self.D[y]: -                self.D[x], self.D[y] = self.D[y], self.D[x] -            else: -                pass -            self.D[x] += self.D[y] -            self.D[y] = x -            return True - -    def same(self, x: int, y: int) -> bool: -        return self.find(x) == self.find(y) - -    def size(self, x: int) -> int: -        return -self.D[self.find(x)] +n, m, k = map(int, input().split()) +F = [[] for i in range(n)]  # Friend list +for i in range(m): +    a, b = map(int, input().split()) +    a, b = a - 1, b - 1 +    F[a].append(b) +    F[b].append(a) +gnum = 1  # group number +# DFS +def DFS_func(a: int, gnum: int):  # Target, Data +    if G[a] == 0: +        G[a] = gnum +        for i in range(len(F[a])): +            DFS_func(F[a][i], gnum) +    else: +        pass -n, m, k = map(int, input().split()) -uf = UnionFind(n) -CF = [0] * n  # Count Friend -for i in range(m): -    a, b = map(int, input().split()) -    a -= 1 -    b -= 1 -    CF[a] += 1 -    CF[b] += 1 -    uf.unite(a, b) -CBinG = [0] * n  # Count Block in Group +G = [0 for i in range(n)]  # it has Group numbers +for i in range(n): +    if G[i] == 0: +        DFS_func(i, gnum) +        gnum += 1 +    else: +        pass +B = [0 for i in range(n)]  # How many Blocks in the same Group -    c -= 1 -    d -= 1 -    if uf.same(c, d) == True: -        CBinG[c] += 1 -        CBinG[d] += 1 +    c, d = c - 1, d - 1 +    if G[c] == G[d]: +        B[c], B[d] = B[c] + 1, B[d] + 1 +GS = [0 for i in range(gnum)]  # Group Size -    ans = uf.size(i) - 1 - CF[i] - CBinG[i] +    GS[G[i]] += 1 +for i in range(n): +    if G[i] == 0: +        ans = 0 +    else: +        ans = GS[G[i]] - len(F[i]) - B[i] - 1