#include <bits/stdc++.h>
using namespace std;
#define N 100005
int n,m,c,fa[N],sz[N];vector<int> e[N];
void clear() {for(int i=1;i<=n;++i) fa[i]=i,sz[i]=1;}
int rt(int x) {return x==fa[x]?x:fa[x]=rt(fa[x]);}
void merge(int x,int y) {x=rt(x);y=rt(y);if(x!=y) fa[x]=y,sz[y]+=sz[x];}
int main()
{
	scanf("%d %d %d",&n,&m,&c);clear(); 
	for(int i=1,x,y;i<=m;++i) scanf("%d %d",&x,&y),e[x].push_back(y),e[y].push_back(x),merge(x,y);
	for(int i=1,x,y;i<=c;++i) scanf("%d %d",&x,&y),e[x].push_back(y),e[y].push_back(x);
	for(int i=1,res;i<=n;++i)
	{
		res=sz[rt(i)]-1;
		for(int j=0;j<e[i].size();++j) if(rt(i)==rt(e[i][j])) --res;printf("%d ",res);
	}return 0;
}