# 4 4 1
# 2 1
# 1 3
# 3 2
# 3 4
# 4 1

inp = input
MAXX = 10**5 + 5

def bfs(NN, adj, visited, node, comp, ncomp):
    compsize = 0
    while len(node) > 0:
        newnode = []
        for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
        node = newnode

    return compsize


###############################
N, M, K = map(int, inp().split())
adj = [[] for _ in range(N+1)]
nfriend = [0]*(N+1)
nblock = [0]*(N+1)
for m in range(M):
    a, b, = map(int, inp().split())
    adj[a].append(b)
    adj[b].append(a)
    nfriend[a] += 1
    nfriend[b] += 1

comp = [0]*(N+1)
compsize = [0]
ncomp = 0
visited = [False]*(N+1)

for n in range(1, N+1):
    if comp[n] <= 0:
        visited[n] = True
        csize = bfs(N, adj, visited, [n], comp, ncomp+1)
        if csize > 0:
            ncomp += 1
            compsize.append(csize)

for k in range(K):
    c, d = map(int, inp().split())
    if comp[c] == comp[d]:
        nblock[c] += 1
        nblock[d] += 1

ans = ""
for n in range(1, N+1):
    can = compsize[comp[n]] - nfriend[n] - nblock[n] - 1
    ans += str(can)
    if n == N:
        ans += "\n"
    else:
        ans += " "

print(ans)

 inp = input inp input MAXX = 10**5 + 5 MAXX 10**5 + 5 10**5 10 5 5 def bfs(NN, adj, visited, node, comp, ncomp):
    compsize = 0
    while len(node) > 0:
        newnode = []
        for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
        node = newnode

    return compsize


############################### bfs compsize = 0 compsize 0 while len(node) > 0:
        newnode = []
        for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
        node = newnode

     len(node) > 0 len(node) len node 0 newnode = [] newnode [] for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
         n node comp[n] = ncomp comp[n] comp n ncomp compsize += 1 compsize 1 for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
         a adj[n] adj n if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
         visited[a] == False visited[a] visited a False visited[a] = True visited[a] visited a True newnode.append(a) newnode.append newnode append a node = newnode node newnode return compsize compsize NN NN adj adj visited visited node node comp comp ncomp ncomp N, M, K = map(int, inp().split()) N map(int, inp().split()) map int inp().split() ().split () inp split M K [] for _ in range(N+1) for _ in range(N+1) _ range(N+1) range N+1 N 1 for _ in range(N+1) [] adj = [[] for _ in range(N+1)] adj [[] for _ in range(N+1)] nfriend = [0]*(N+1) nfriend [0]*(N+1) [0] 0 N+1 N 1 nblock = [0]*(N+1) nblock [0]*(N+1) [0] 0 N+1 N 1 for m in range(M):
    a, b, = map(int, inp().split())
    adj[a].append(b)
    adj[b].append(a)
    nfriend[a] += 1
    nfriend[b] += 1 m range(M) range M a, b, = map(int, inp().split()) a map(int, inp().split()) map int inp().split() ().split () inp split b adj[a].append(b) [a].append [a] adj a append b adj[b].append(a) [b].append [b] adj b append a nfriend[a] += 1 nfriend[a] nfriend a 1 nfriend[b] += 1 nfriend[b] nfriend b 1 comp = [0]*(N+1) comp [0]*(N+1) [0] 0 N+1 N 1 compsize = [0] compsize [0] 0 ncomp = 0 ncomp 0 visited = [False]*(N+1) visited [False]*(N+1) [False] False N+1 N 1 for n in range(1, N+1):
    if comp[n] <= 0:
        visited[n] = True
        csize = bfs(N, adj, visited, [n], comp, ncomp+1)
        if csize > 0:
            ncomp += 1
            compsize.append(csize) n range(1, N+1) range 1 N+1 N 1 if comp[n] <= 0:
        visited[n] = True
        csize = bfs(N, adj, visited, [n], comp, ncomp+1)
        if csize > 0:
            ncomp += 1
            compsize.append(csize) comp[n] <= 0 comp[n] comp n 0 visited[n] = True visited[n] visited n True csize = bfs(N, adj, visited, [n], comp, ncomp+1) csize bfs(N, adj, visited, [n], comp, ncomp+1) bfs N adj visited [n] n comp ncomp+1 ncomp 1 if csize > 0:
            ncomp += 1
            compsize.append(csize) csize > 0 csize 0 ncomp += 1 ncomp 1 compsize.append(csize) compsize.append compsize append csize for k in range(K):
    c, d = map(int, inp().split())
    if comp[c] == comp[d]:
        nblock[c] += 1
        nblock[d] += 1 k range(K) range K c, d = map(int, inp().split()) c map(int, inp().split()) map int inp().split() ().split () inp split d if comp[c] == comp[d]:
        nblock[c] += 1
        nblock[d] += 1 comp[c] == comp[d] comp[c] comp c comp[d] comp d nblock[c] += 1 nblock[c] nblock c 1 nblock[d] += 1 nblock[d] nblock d 1 ans = "" ans "" for n in range(1, N+1):
    can = compsize[comp[n]] - nfriend[n] - nblock[n] - 1
    ans += str(can)
    if n == N:
        ans += "\n"
    else:
        ans += " " n range(1, N+1) range 1 N+1 N 1 can = compsize[comp[n]] - nfriend[n] - nblock[n] - 1 can compsize[comp[n]] - nfriend[n] - nblock[n] - 1 compsize[comp[n]] - nfriend[n] - nblock[n] compsize[comp[n]] - nfriend[n] compsize[comp[n]] compsize comp[n] comp n nfriend[n] nfriend n nblock[n] nblock n 1 ans += str(can) ans str(can) str can if n == N:
        ans += "\n"
    else:
        ans += " " n == N n N ans += "\n" ans "\n" ans += " " ans " " print(ans) print ans inp = input input inp csize = bfs(N, adj, visited, [n], comp, ncomp+1) bfs(N, adj, visited, [n], comp, ncomp+1) csize nfriend = [0]*(N+1) [0]*(N+1) nfriend K = map(int, inp().split()) map(int, inp().split()) K M, K = map(int, inp().split()) map(int, inp().split()) M ans += "\n" "\n" ans ncomp = 0 0 ncomp adj = [[] for _ in range(N+1)] [[] for _ in range(N+1)] adj MAXX = 10**5 + 5 10**5 + 5 MAXX N, M, K = map(int, inp().split()) map(int, inp().split()) N d = map(int, inp().split()) map(int, inp().split()) d compsize = [0] [0] compsize ans = "" "" ans ncomp += 1 1 ncomp ans += str(can) str(can) ans a, b, = map(int, inp().split()) map(int, inp().split()) a ans += " " " " ans visited = [False]*(N+1) [False]*(N+1) visited b, = map(int, inp().split()) map(int, inp().split()) b comp = [0]*(N+1) [0]*(N+1) comp can = compsize[comp[n]] - nfriend[n] - nblock[n] - 1 compsize[comp[n]] - nfriend[n] - nblock[n] - 1 can def bfs(NN, adj, visited, node, comp, ncomp):
    compsize = 0
    while len(node) > 0:
        newnode = []
        for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
        node = newnode

    return compsize


############################### def bfs(NN, adj, visited, node, comp, ncomp):
    compsize = 0
    while len(node) > 0:
        newnode = []
        for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
        node = newnode

    return compsize


############################### bfs nblock = [0]*(N+1) [0]*(N+1) nblock c, d = map(int, inp().split()) map(int, inp().split()) c
# 4 4 1
# 2 1
# 1 3
# 3 2
# 3 4
# 4 1

inp = input
MAXX = 10**5 + 5

def bfs(NN, adj, visited, node, comp, ncomp):
    compsize = 0
    while len(node) > 0:
        newnode = []
        for n in node:
            comp[n] = ncomp
            compsize += 1
            for a in adj[n]:
                if visited[a] == False:
                    visited[a] = True
                    newnode.append(a)
        node = newnode

    return compsize


###############################
N, M, K = map(int, inp().split())
adj = [[] for _ in range(N+1)]
nfriend = [0]*(N+1)
nblock = [0]*(N+1)
for m in range(M):
    a, b, = map(int, inp().split())
    adj[a].append(b)
    adj[b].append(a)
    nfriend[a] += 1
    nfriend[b] += 1

comp = [0]*(N+1)
compsize = [0]
ncomp = 0
visited = [False]*(N+1)

for n in range(1, N+1):
    if comp[n] <= 0:
        visited[n] = True
        csize = bfs(N, adj, visited, [n], comp, ncomp+1)
        if csize > 0:
            ncomp += 1
            compsize.append(csize)

for k in range(K):
    c, d = map(int, inp().split())
    if comp[c] == comp[d]:
        nblock[c] += 1
        nblock[d] += 1

ans = ""
for n in range(1, N+1):
    can = compsize[comp[n]] - nfriend[n] - nblock[n] - 1
    ans += str(can)
    if n == N:
        ans += "\n"
    else:
        ans += " "

print(ans)


