#include <bits/stdc++.h>
#pragma warning(disable : 4996)
int N, M, K;
struct NodeInfo {
  int index;
  int dec;
  int size;
  int rank;
  NodeInfo *p;
  NodeInfo() : index(-1), dec(1), size(1), rank(0), p(NULL) {}
};
NodeInfo infos[100001];
int GetGroupIndex(NodeInfo *ni) {
  while (ni->p != NULL) {
    ni = ni->p;
  }
  return ni->index;
}
void Merge(NodeInfo *a, NodeInfo *b) {
  int ai = GetGroupIndex(a);
  int bi = GetGroupIndex(b);
  if (ai != bi) {
    if (infos[ai].rank < infos[bi].rank) {
      infos[bi].p = &infos[ai];
      infos[ai].size += infos[bi].size;
      if (infos[ai].rank < infos[bi].rank + 1) {
        infos[ai].rank = infos[bi].rank + 1;
      }
    } else {
      infos[ai].p = &infos[bi];
      infos[bi].size += infos[ai].size;
      if (infos[bi].rank < infos[ai].rank + 1) {
        infos[bi].rank = infos[ai].rank + 1;
      }
    }
  }
  a->dec += 1;
  b->dec += 1;
}
int main(void) {
  for (int i = 0; i <= 100001; ++i) {
    infos[i].index = i;
  }
  scanf("%d %d %d", &N, &M, &K);
  for (int i = 0; i < M; ++i) {
    int A, B;
    scanf("%d %d", &A, &B);
    Merge(&infos[A], &infos[B]);
  }
  for (int i = 0; i < K; ++i) {
    int C, D;
    scanf("%d %d", &C, &D);
    if (GetGroupIndex(&infos[C]) == GetGroupIndex(&infos[D])) {
      ++infos[C].dec;
      ++infos[D].dec;
    }
  }
  for (int i = 1; i <= N; ++i) {
    int gi = GetGroupIndex(&infos[i]);
    printf("%d ", infos[gi].size - infos[i].dec);
  }
  return 0;
}
