#include <bits/stdc++.h>
using namespace std;
int id;
vector<int> cc_id;
void dfs(vector<vector<int>> G, int v, int &cnt) {
  cc_id[v] = id;
  cnt++;
  for (auto i : G[v]) {
    if (cc_id[i] != -1) continue;
    dfs(G, i, cnt);
  }
}
int main() {
  int N, M, K;
  cin >> N >> M >> K;
  vector<vector<int>> G(N);
  vector<int> cc_num;
  for (int i = 0; i < (M); ++i) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  cc_id.assign(N, -1);
  id = 0;
  for (int i = 0; i < (N); ++i) {
    if (cc_id[i] == -1) {
      int cnt = 0;
      dfs(G, i, cnt);
      cc_num.push_back(cnt);
      id++;
    }
  }
  vector<int> ans(N);
  for (int i = 0; i < (N); ++i)
    ans[i] = cc_num[cc_id[i]] - (int)G[i].size() - 1;
  for (int i = 0; i < (K); ++i) {
    int c, d;
    cin >> c >> d;
    c--;
    d--;
    if (cc_id[c] == cc_id[d]) {
      ans[c]--;
      ans[d]--;
    }
  }
  for (int i = 0; i < (N); ++i) cout << ans[i] << ' ';
  cout << endl;
}
