#include <bits/stdc++.h>
using namespace std;

const int N = 1e5+5;
int n,m,k,c[N],ans[N],tot;
vector<int> g[N];

void dfs(int v, int at){
    tot++;
    for(auto u:g[v]){
        if(!c[u]){
            c[u]=at;
            dfs(u,at);
        }
    }
}

int main(){
    scanf("%d %d %d", &n,&m,&k);
    for(int i = 0;i<m;i++){
        int a,b;
        scanf("%d %d",&a,&b);
        g[a].push_back(b);
        g[b].push_back(a);
    }
    for(int i = 1;i<=n;i++){
        if(!c[i]){
            tot=0;
            c[i]=i;
            dfs(i,i);
            ans[i] = tot-1;
        }
        else ans[i] = ans[c[i]];  
    }
    for(int i = 0;i<k;i++){
        int a,b;
        scanf("%d %d",&a,&b);
        if(c[a]==c[b]){
            ans[a]--;
            ans[b]--;
        }
    }
    for(int i = 1;i<=n;i++){
        printf("%d ", ans[i]-g[i].size());
    }
    printf("\n");
}