#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << ' ' << *it << " = " << a;
  err(++it, args...);
}
const int N = 1e5 + 1, M = 5e5 + 1, OO = 0x3f3f3f3f, MOD = 1e9 + 7;
vector<int> adj[N];
int par[N], sz[N];
int n, m, k;
void init() {
  fill(sz, sz + n, 1);
  iota(par, par + n, 0);
}
int find(int p) { return p == par[p] ? p : par[p] = find(par[p]); }
bool sameset(int a, int b) { return find(a) == find(b); }
void join(int a, int b) {
  a = find(a), b = find(b);
  if (a == b) return;
  if (sz[a] < sz[b]) swap(a, b);
  par[b] = a;
  sz[a] += sz[b];
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  init();
  for (int i = 0; i < m; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--, v--;
    adj[u].push_back(v);
    adj[v].push_back(u);
    join(u, v);
  }
  for (int i = 0; i < k; ++i) {
    int u, v;
    scanf("%d%d", &u, &v);
    u--, v--;
    if (sameset(u, v)) {
      adj[u].push_back(v);
      adj[v].push_back(u);
    }
  }
  for (int i = 0; i < n; ++i) {
    {
      cerr << "LINE " << 58;
      string _s = "i + 1, sz[find(i)], adj[i].size()";
      replace(_s.begin(), _s.end(), ',', ' ');
      stringstream _ss(_s);
      istream_iterator<string> _it(_ss);
      err(_it, i + 1, sz[find(i)], adj[i].size());
      cerr << endl;
    };
    printf("%ld ", sz[i] - adj[i].size() - 1);
  }
  return 0;
}
