#include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;

int n,m,k;
int seen[100010];

void dfs(vector<vector<int>> G, int v, int cur){
  seen[v]=cur;
  for(auto next_v:G[v]){
    if(seen[next_v]==cur) continue;
    dfs(G,next_v,cur);
  }
}

int main() {
  cin>>n>>m>>k;
  vector<vector<int>> fri(100010);
  vector<vector<int>> blo(100010);
  for(int i=0;i<m;i++){
    int a,b;
    cin>>a>>b;
    fri.at(a-1).push_back(b-1);
    fri.at(b-1).push_back(a-1);
  }
  for(int i=0;i<k;i++){
    int a,b;
    cin>>a>>b;
    blo.at(a-1).push_back(b-1);
    blo.at(b-1).push_back(a-1);
  }
  seen.assign(n+2,0);
  int cur=1;
  for(int i=0;i<n;i++){
    if(seen[i]>=1) continue;
    else {
      dfs(fri,i,cur);
      cur++;
    }
  }
  int memo[100010]={};
  for(int i=0;i<n;i++){
    memo[seen[i]]++;
  }
  for(int i=0;i<n;i++){
    int ans=memo[seen[i]];
    ans-=1;
    ans-=fri.at(i).size();
    for(int j=0;j<blo.at(i).size();j++){
      if(memo[seen[i]]==memo[seen[blo.at(i).at(j)]]) ans--;
    }
    cout<<ans;
    if(i!=n-1) cout<<' ';
  }
  cout<<endl;
  return 0;
}