#include <bits/stdc++.h>
using namespace std;
struct UnionFind {
  vector<int> par;
  vector<int> size;
  UnionFind(int n) : par(n), size(n) {
    for (int i = 0; i < n; i++) {
      par[i] = i;
      size[i] = 1;
    }
  }
  int find_par(int x) {
    if (par[x] == x) {
      return x;
    } else {
      return par[x] = find_par(par[x]);
    }
  }
  void merge_tree(int x, int y) {
    x = find_par(x);
    y = find_par(y);
    if (x == y) {
      return;
    }
    if (size[x] < size[y]) {
      swap(x, y);
    }
    par[y] = x;
    size[x] += size[y];
  }
  bool same(int x, int y) { return find_par(x) == find_par(y); }
  int print_size(int x) { return size[find_par(x)]; }
};
int main() {
  int N, M, K;
  cin >> N >> M >> K;
  vector<int> a(M), b(M);
  vector<int> c(K), d(K);
  UnionFind uf(N);
  vector<int> ans(N, -1);
  for (int i = 0; i < M; i++) {
    cin >> a[i] >> b[i];
    a[i]--, b[i]--;
    uf.merge_tree(a[i], b[i]);
  }
  for (int i = 0; i < K; i++) {
    cin >> c[i] >> d[i];
    c[i]--, d[i]--;
  }
  for (int i = 0; i < N; i++) {
    ans[i] += uf.print_size(i);
  }
  for (int i = 0; i < K; i++) {
    if (uf.same(c[i], d[i])) {
      ans[c[i]]--;
      ans[d[i]]--;
    }
  }
  for (int i = 0; i < M; i++) {
    if (uf.same(a[i], b[i])) {
      ans[a[i]]--;
      ans[b[i]]--;
    }
  }
  for (int i = 0; i < N; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
