#include<bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
using ll = long long;

int n, m , k;
int id;
vector<int> cc_id;
vector<int> cc_num;

void dfs(const vector<vector<int>> &g, int v, int &cnt){
  cc_id[v] = id;
  cnt++;
  for(auto e : g.at(v)){
    if(cc_id.at(e) == -1){
      dfs(g, e, cnt);
    }
  }
}

int main(){
  cin >> n >> m >> k;
  vector<<vector<int>>> g(n);
  vector<int> a(m), b(m);
  rep(i,m){
    cin >> a[i] >> b[i];
    a[i]--;
    b[i]--;
    g.at(a[i]).push_back(b[i]);
    g.at(b[i]).push_back(a[i]);
  }
  vector<int> c(k), d(k);
  rep(i,k){
    cin >> c[i] >> d[i];
    c[i]--, d[i]--;
  }
  
  id = 0;
  cc_id.assign(n, -1);
  rep(i,n){
    if(cc_id[i] == -1){
      int cnt = 0;
      dfs(g, i, cnt);
      id++;
      cc_num.push_back(cnt);
    }
  }
  
  vector<int> ans(n);
  rep(i,n){
    ans[i] = cc_num(cc_id[i]) - 1 - g[i].size();
  }
  rep(i,k){
    if(cc_id(c[i]) == cc_id(d[i])){
      ans[c[i]]--;
      ans[d[i]]--;
    }
  }
  rep(i,n - 1){
    cout << ans[i] << ' ';
  }
  cout << ans[n - 1] << endl;
}

