#include <bits/stdc++.h>
using namespace std;
vector<int> group;
vector<vector<int>> G;
map<int,int> num;

void dfs(int v,int w) {
  group[v] = w;
  num[w]++;
  for (auto next : G[v]) {
    if (group[next]!=-1) continue;
    dfs(next,w);
  }
}

int main() {
  int n,m,k,a,b; cin >> n >> m >> k;
  G.resize(n+1);
  vector<int> minus(n+1,1);
  for (int i=0;i<m;i++) {
    cin >> a >> b;
    G[a].push_back(b);
    G[b].push_back(a);
    minus[a]++;minus[b]++;
  }
  group.assign(n+1, -1);
  for(int v=1;v<=n;v++){
    if(group[v]!=-1) continue;
    num[v]=0;
    dfs(v,v);
  }
  for(int i=0;i<k;i++){
    cin >> a >> b;
    if(group[a]==group[b]){minus[a]++;minus[b]++;}
  }
  for(int i=1;i<=n;i++) cout << num[group[i]] - minus[i] << endl;
}
