class DisjointSet:

    def __init__(self,n):

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

        self.siz = [1]*n



    def root(self,x):

        if x != self.parent[x]: 

            self.parent[x] = self.root(self.parent[x])

        return self.parent[x]



    def same(self,x,y): 

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



    def unite(self,x,y): 

        x = self.root(x)

        y = self.root(y)

        if x == y: 

            return

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

            x,y = y,x

        self.parent[y] = x

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



    def size(self,x):

        return self.siz[self.root(x)]



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

cnt = [0]*n

ds = DisjointSet(n)

for _ in range(m):

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

    a -= 1

    b -= 1

    cnt[a] += 1

    cnt[b] += 1

    ds.unite(a,b)

for _ in range(k):

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

    c -= 1

    d -= 1

    if ds.same(c,d):

        cnt[c] += 1

        cnt[d] += 1

ans = [ds.size(i) - cnt[i] - 1 for i in range(n)]

print((*ans))
from collections import deque,Counter

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

G = [[] for _ in range(n)]



exc = [0]*n

for _ in range(m):

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

    a -= 1

    b -= 1

    G[a].append(b)

    G[b].append(a)

    exc[a] += 1

    exc[b] += 1



stk = deque()

grp = [-1]*n

grpnum = 0

def dfs(s,g):

    stk.append(s)

    grp[s] = g

    while stk:

        cur = stk.pop()

        for nxt in G[cur]:

            if grp[nxt] != -1: continue

            grp[nxt] = g

            stk.append(nxt)



for i in range(n):

    if grp[i] != -1: continue

    dfs(i,grpnum)

    grpnum += 1

cnt = Counter(grp)



for _ in range(k):

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

    c -= 1

    d -= 1

    if grp[c] == grp[d]:

        exc[c] += 1

        exc[d] += 1



ans = [cnt[grp[i]] - exc[i] - 1 for i in range(n)]

print((*ans))   
class DisjointSet:
    def __init__(self, n):
        self.parent = [i for i in range(n)]
        self.siz = [1] * n

    def root(self, x):
        if x != self.parent[x]:
            self.parent[x] = self.root(self.parent[x])
        return self.parent[x]

    def same(self, x, y):
        return self.root(x) == self.root(y)

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        if self.siz[x] < self.siz[y]:
            x, y = y, x
        self.parent[y] = x
        self.siz[x] += self.siz[y]

    def size(self, x):
        return self.siz[self.root(x)]


n, m, k = list(map(int, input().split()))
cnt = [0] * n
ds = DisjointSet(n)
for _ in range(m):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    cnt[a] += 1
    cnt[b] += 1
    ds.unite(a, b)
for _ in range(k):
    c, d = list(map(int, input().split()))
    c -= 1
    d -= 1
    if ds.same(c, d):
        cnt[c] += 1
        cnt[d] += 1
ans = [ds.size(i) - cnt[i] - 1 for i in range(n)]
print((*ans))

from collections import deque, Counter

n, m, k = list(map(int, input().split()))
G = [[] for _ in range(n)]
exc = [0] * n
for _ in range(m):
    a, b = list(map(int, input().split()))
    a -= 1
    b -= 1
    G[a].append(b)
    G[b].append(a)
    exc[a] += 1
    exc[b] += 1
stk = deque()
grp = [-1] * n
grpnum = 0


def dfs(s, g):
    stk.append(s)
    grp[s] = g
    while stk:
        cur = stk.pop()
        for nxt in G[cur]:
            if grp[nxt] != -1:
                continue
            grp[nxt] = g
            stk.append(nxt)


for i in range(n):
    if grp[i] != -1:
        continue
    dfs(i, grpnum)
    grpnum += 1
cnt = Counter(grp)
for _ in range(k):
    c, d = list(map(int, input().split()))
    c -= 1
    d -= 1
    if grp[c] == grp[d]:
        exc[c] += 1
        exc[d] += 1
ans = [cnt[grp[i]] - exc[i] - 1 for i in range(n)]
print((*ans))

-class DisjointSet: -    def __init__(self, n): -        self.parent = [i for i in range(n)] -        self.siz = [1] * n - -    def root(self, x): -        if x != self.parent[x]: -            self.parent[x] = self.root(self.parent[x]) -        return self.parent[x] - -    def same(self, x, y): -        return self.root(x) == self.root(y) - -    def unite(self, x, y): -        x = self.root(x) -        y = self.root(y) -        if x == y: -            return -        if self.siz[x] < self.siz[y]: -            x, y = y, x -        self.parent[y] = x -        self.siz[x] += self.siz[y] - -    def size(self, x): -        return self.siz[self.root(x)] - +from collections import deque, Counter -cnt = [0] * n -ds = DisjointSet(n) +G = [[] for _ in range(n)] +exc = [0] * n -    cnt[a] += 1 -    cnt[b] += 1 -    ds.unite(a, b) +    G[a].append(b) +    G[b].append(a) +    exc[a] += 1 +    exc[b] += 1 +stk = deque() +grp = [-1] * n +grpnum = 0 + + +def dfs(s, g): +    stk.append(s) +    grp[s] = g +    while stk: +        cur = stk.pop() +        for nxt in G[cur]: +            if grp[nxt] != -1: +                continue +            grp[nxt] = g +            stk.append(nxt) + + +for i in range(n): +    if grp[i] != -1: +        continue +    dfs(i, grpnum) +    grpnum += 1 +cnt = Counter(grp) -    if ds.same(c, d): -        cnt[c] += 1 -        cnt[d] += 1 -ans = [ds.size(i) - cnt[i] - 1 for i in range(n)] +    if grp[c] == grp[d]: +        exc[c] += 1 +        exc[d] += 1 +ans = [cnt[grp[i]] - exc[i] - 1 for i in range(n)]