#include<bits/stdc++.h>
#define N 100059
#define show(x) cerr << #x << " = " << x << '\n'
using namespace std;
int n, m, k, x, y;
int f[N], ans[N], s[N];
int get_f(int i){
    return f[i] == i ? i : f[i] = get_f(f[i]);
}
void _merge(int u,int v){
    int f1 = get_f(u),f2 = get_f(v);
    if(f1 != f2)f[f2] = f1,s[f1] += s[f2];
}
void init(){
    for(int i = 0;i <= n;i ++){
        f[i] = i;s[i] = 1;
    }
}
int main(int argc,char * argv[]){
    scanf("%d%d%d", &n, &m, &k);
    init();
    while(m --){
        scanf("%d%d", &x, &y);
        ans[x] ++,ans[y] ++;
        _merge(x,y);
    }
    while(k --){
        scanf("%d%d", &x, &y);
        if(get_f(x) == get_f(y))ans[x] ++,ans[y] ++;
    }
    for(int i = 1;i <= n;i ++){
        printf("%d ",s[get_f(i)] - ans[i] - 1);
    }
    return 0;
}