import sys

def input():

    return sys.stdin.readline()[:-1]

sys.setrecursionlimit(200000)

class uf:

    def __init__(self,n):

        self.n=n

        self.l=[-1]*n

    def ro(self,n):

        if self.l[n]<0:

            return n

        r=self.ro(self.l[n])

        self.l[n]=r

        return r

    def me(self,a,b):

        ra=self.ro(a)

        rb=self.ro(b)

        if ra!=rb:

            self.l[ra]+=self.l[rb]

            self.l[rb]=ra

    def size(self,n):

        return -self.l[self.ro(n)]

    def sa(self,a,b):

        return self.ro(a)==self.ro(b)

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

u=uf(N)

l=[-1]*N

for i in range(M):

    A,B=[int(x)-1 for x in input().split()]

    u.me(A,B)

    l[A]-=1

    l[B]-=1

for i in range(N):

    l[i]+=u.size(i)

for i in range(K):

    C,D=[int(x)-1 for x in input().split()]

    if u.sa(C,D):

        l[C]-=1

        l[D]-=1

print((*l))

import sys

def input():

    return sys.stdin.readline()[:-1]

sys.setrecursionlimit(200000)

class uf:

    def __init__(self,n):

        self.n=n

        self.l=[-1]*n

    def ro(self,n):

        if self.l[n]<0:

            return n

        r=self.ro(self.l[n])

        self.l[n]=r

        return r

    def me(self,a,b):

        ra=self.ro(a)

        rb=self.ro(b)

        if self.l[ra]>self.l[rb]:

            ra,rb=rb,ra

        if ra!=rb:

            self.l[ra]+=self.l[rb]

            self.l[rb]=ra

    def size(self,n):

        return -self.l[self.ro(n)]

    def sa(self,a,b):

        return self.ro(a)==self.ro(b)

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

u=uf(N)

l=[-1]*N

for i in range(M):

    A,B=[int(x)-1 for x in input().split()]

    u.me(A,B)

    l[A]-=1

    l[B]-=1

for i in range(N):

    l[i]+=u.size(i)

for i in range(K):

    C,D=[int(x)-1 for x in input().split()]

    if u.sa(C,D):

        l[C]-=1

        l[D]-=1

print((*l))
import sys


def input():
    return sys.stdin.readline()[:-1]


sys.setrecursionlimit(200000)


class uf:
    def __init__(self, n):
        self.n = n
        self.l = [-1] * n

    def ro(self, n):
        if self.l[n] < 0:
            return n
        r = self.ro(self.l[n])
        self.l[n] = r
        return r

    def me(self, a, b):
        ra = self.ro(a)
        rb = self.ro(b)
        if ra != rb:
            self.l[ra] += self.l[rb]
            self.l[rb] = ra

    def size(self, n):
        return -self.l[self.ro(n)]

    def sa(self, a, b):
        return self.ro(a) == self.ro(b)


N, M, K = list(map(int, input().split()))
u = uf(N)
l = [-1] * N
for i in range(M):
    A, B = [int(x) - 1 for x in input().split()]
    u.me(A, B)
    l[A] -= 1
    l[B] -= 1
for i in range(N):
    l[i] += u.size(i)
for i in range(K):
    C, D = [int(x) - 1 for x in input().split()]
    if u.sa(C, D):
        l[C] -= 1
        l[D] -= 1
print((*l))

import sys


def input():
    return sys.stdin.readline()[:-1]


sys.setrecursionlimit(200000)


class uf:
    def __init__(self, n):
        self.n = n
        self.l = [-1] * n

    def ro(self, n):
        if self.l[n] < 0:
            return n
        r = self.ro(self.l[n])
        self.l[n] = r
        return r

    def me(self, a, b):
        ra = self.ro(a)
        rb = self.ro(b)
        if self.l[ra] > self.l[rb]:
            ra, rb = rb, ra
        if ra != rb:
            self.l[ra] += self.l[rb]
            self.l[rb] = ra

    def size(self, n):
        return -self.l[self.ro(n)]

    def sa(self, a, b):
        return self.ro(a) == self.ro(b)


N, M, K = list(map(int, input().split()))
u = uf(N)
l = [-1] * N
for i in range(M):
    A, B = [int(x) - 1 for x in input().split()]
    u.me(A, B)
    l[A] -= 1
    l[B] -= 1
for i in range(N):
    l[i] += u.size(i)
for i in range(K):
    C, D = [int(x) - 1 for x in input().split()]
    if u.sa(C, D):
        l[C] -= 1
        l[D] -= 1
print((*l))

+        if self.l[ra] > self.l[rb]: +            ra, rb = rb, ra