#include <bits/stdc++.h>
int parent[100005];
int length[100005];
void init() {
  for (int i = 0; i < 100005; i++) {
    parent[i] = -1;
    length[i] = 1;
  }
  return;
}
int getroot(int a) {
  int temp = a;
  while (parent[temp] != -1) {
    temp = parent[temp];
  }
  return temp;
}
bool samegroup(int a, int b) {
  if (getroot(a) == getroot(b)) {
    return true;
  } else {
    return false;
  }
}
void combine(int a, int b) {
  if (samegroup(a, b)) {
    return;
  }
  int aroot = getroot(a);
  int broot = getroot(b);
  if (length[aroot] > length[broot]) {
    parent[broot] = aroot;
    length[aroot] += length[broot];
  } else {
    parent[aroot] = broot;
    length[broot] += length[aroot];
  }
  return;
}
int count(int a) {
  int aroot = getroot(a);
  return length[aroot];
}
int main() {
  init();
  int N, M, K;
  scanf("%d", &N);
  scanf("%d", &M);
  scanf("%d", &K);
  std::vector<int> A(M), B(M);
  std::vector<int> C(K), D(K);
  std::vector<int> like[100005];
  for (int i = 0; i < M; i++) {
    scanf("%d", &A[i]);
    scanf("%d", &B[i]);
    A[i]--;
    B[i]--;
    like[A[i]].push_back(B[i]);
    like[B[i]].push_back(A[i]);
    combine(A[i], B[i]);
  }
  std::vector<int> dislike[100005];
  for (int i = 0; i < K; i++) {
    scanf("%d", &C[i]);
    scanf("%d", &D[i]);
    C[i]--;
    D[i]--;
    dislike[C[i]].push_back(D[i]);
    dislike[D[i]].push_back(C[i]);
  }
  for (int i = 0; i < N; i++) {
    int groupnum = count(i);
    int dislikecount = 0;
    for (int j = 0; j < dislike[i].size(); j++) {
      if (samegroup(i, dislike[i][j])) {
        dislikecount++;
      }
    }
    int likecount = 0;
    for (int j = 0; j < like[i].size(); j++) {
      if (samegroup(i, like[i][j])) {
        likecount++;
      }
    }
    printf("%d\n", groupnum - 1 - dislikecount - likecount);
  }
  return 0;
}
