from collections import defaultdict

from collections import Counter



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



fn = defaultdict(lambda: 1)

CD = [0]*K



par = list(range(N))



def root(x):

    S = set()

    S.add(x)

    y = x

    while True:

        if par[y] == y:

            for s in S:

                par[s] = y

            return y

        S.add(y)

        y = par[y]



def unite(x,y):

    rx = root(x)

    ry = root(y)

    par[rx] = ry



for _ in range(M):

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

    A -= 1

    B -= 1

    fn[A] += 1

    fn[B] += 1

    unite(A,B)

    

for _ in range(K):

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

    C -= 1

    D -= 1

    CD[_] = (C,D)



par = [root(x) for x in range(N)]

c = Counter(par)



RESULT = [(c[par[x]] - fn[x]) for x in range(N)]



for C,D in CD:

    if par[C] == par[D]:

        RESULT[C] -= 1

        RESULT[D] -= 1



print(*RESULT,sep=" ")

from collections import defaultdict

from collections import Counter



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



fn = [1]*N

CD = [0]*K



par = list(range(N))



def root(x):

    S = set()

    S.add(x)

    y = x

    while True:

        if par[y] == y:

            for s in S:

                par[s] = y

            return y

        S.add(y)

        y = par[y]



def unite(x,y):

    rx = root(x)

    ry = root(y)

    par[rx] = ry



for _ in range(M):

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

    A -= 1

    B -= 1

    fn[A] += 1

    fn[B] += 1

    unite(A,B)

    

for _ in range(K):

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

    C -= 1

    D -= 1

    CD[_] = (C,D)



par = [root(x) for x in range(N)]

c = Counter(par)



RESULT = [(c[par[x]] - fn[x]) for x in range(N)]



for C,D in CD:

    if par[C] == par[D]:

        RESULT[C] -= 1

        RESULT[D] -= 1



print(*RESULT,sep=" ")

from collections import defaultdict
from collections import Counter

N, M, K = map(int, input().split())
fn = defaultdict(lambda: 1)
CD = [0] * K
par = list(range(N))


def root(x):
    S = set()
    S.add(x)
    y = x
    while True:
        if par[y] == y:
            for s in S:
                par[s] = y
            return y
        S.add(y)
        y = par[y]


def unite(x, y):
    rx = root(x)
    ry = root(y)
    par[rx] = ry


for _ in range(M):
    A, B = map(int, input().split())
    A -= 1
    B -= 1
    fn[A] += 1
    fn[B] += 1
    unite(A, B)
for _ in range(K):
    C, D = map(int, input().split())
    C -= 1
    D -= 1
    CD[_] = (C, D)
par = [root(x) for x in range(N)]
c = Counter(par)
RESULT = [(c[par[x]] - fn[x]) for x in range(N)]
for C, D in CD:
    if par[C] == par[D]:
        RESULT[C] -= 1
        RESULT[D] -= 1
print(*RESULT, sep=" ")

from collections import defaultdict
from collections import Counter

N, M, K = map(int, input().split())
fn = [1] * N
CD = [0] * K
par = list(range(N))


def root(x):
    S = set()
    S.add(x)
    y = x
    while True:
        if par[y] == y:
            for s in S:
                par[s] = y
            return y
        S.add(y)
        y = par[y]


def unite(x, y):
    rx = root(x)
    ry = root(y)
    par[rx] = ry


for _ in range(M):
    A, B = map(int, input().split())
    A -= 1
    B -= 1
    fn[A] += 1
    fn[B] += 1
    unite(A, B)
for _ in range(K):
    C, D = map(int, input().split())
    C -= 1
    D -= 1
    CD[_] = (C, D)
par = [root(x) for x in range(N)]
c = Counter(par)
RESULT = [(c[par[x]] - fn[x]) for x in range(N)]
for C, D in CD:
    if par[C] == par[D]:
        RESULT[C] -= 1
        RESULT[D] -= 1
print(*RESULT, sep=" ")

-fn = defaultdict(lambda: 1) +fn = [1] * N