#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1e9+7;

#define vec vector<int>
#define vecll vector<ll>
#define vpair vector<pair<int, int>>
#define vpairll vector<pair<ll, ll>>

#define rep(i,n)         for(int i=(int)0; i<(int)n; i++)
#define REP(i,m,n)       for(int i=(int)m; i<(int)n; i++)
#define arr(var, n)      vec var(n); rep(i,n){cin >> var[i];}
#define arrll(var, n)    vecll var(n); rep(i,n){cin >> var[i];}
#define all(var)         (var).begin(), (var).end()
#define sortall(var)     sort(all(var))
#define prt(var)         cout << var << endl
#define prtd(n, var)     cout << fixed << setprecision(n) << var << endl
#define prt2(v1, v2)     cout << v1 << " " << v2 << endl
#define prt3(v1, v2, v3) cout << v1 << " " << v2 << " " << v3 << endl
#define prtall(var)      rep(i,var.size()){cout << var[i] << " ";} cout << endl

//----------------------------------------------------------------
class UnionFind{

public:
  vector<int> parents;

  UnionFind(int n){
    parents.assign(n, -1);
  }
  ~UnionFind(){}

  int find(int x){
    if(parents[x]<0){
      return x;
    } else {
      return find(parents[x]);
    }
  }

  void unite(int x, int y){
    x = find(x);
    y = find(y);
    if(x==y){return;}

    if(parents[x]>parents[y]){
      int tmp = x;
      x = y;
      y = tmp;
    }

    parents[x] += parents[y];
    parents[y] = x;
  }

  int size(int x){
    return -parents[find(x)];
  }

  int count_roots(){
    int ct=0;
    for(int i=0; i<parents.size(); i++){
      if(parents[i]<0){ct++;}
    }
    return ct;
  }

  bool is_same(int x, int y){
    return find(x) == find(y);
  }
};

class Graphs{

public:
  vector<vector<int>> graph;
  vector<int> check; // For DFS
  vector<ll> dist;   // For BFS
  queue<int> q; // For BFS

  Graphs(int n){
    graph.resize(n);
    init(n);
  }
  ~Graphs(){}

  void addedge(int u, int v){
    u--; v--;
    graph[u].push_back(v);
    graph[v].push_back(u);
  }

  void addedge_cin(int m){
    rep(i,m){
      int a, b;
      cin >> a >> b;
      addedge(a, b);
    }
  }

  void init(int n){
    check.assign(n, false);
    dist.assign(n, -1);
  }

  void dfs(int v){
    check[v] = true;

    for(auto next_v : graph[v]){
      if(check[next_v]) continue;
      dfs(next_v);
    }
  }

  void bfs(int v){
    dist[v] = 0;
    q.push(v);

    while(!q.empty()){
      int cur_v = q.front();
      q.pop();

      for(int next_v : graph[cur_v]){
        if(dist[next_v] != -1){
          continue;
        }

        dist[next_v] = dist[cur_v] + 1;
        q.push(next_v);
      }
    }
  }
};

int main(void) {
  int n, m, k;
  cin >> n >> m >> k;
  vpair fri(m);
  vpair blo(k);

  rep(i,m){
    int tmp1, tmp2;
    cin >> tmp1 >> tmp2;
    fri[i] = make_pair(tmp1, tmp2);
  }
  rep(i,k){
    int tmp1, tmp2;
    cin >> tmp1 >> tmp2;
    blo[i] = make_pair(tmp1, tmp2);
  }

  UnionFind uf(n);
  Graphs g(n);

  rep(i,m){
    uf.unite(fri[i].first-1, fri[i].second-1);
    g.addedge(fri[i].first, fri[i].second);
  }
  rep(i,k){
    if(uf.is_same(blo[i].first-1, blo[i].second-1)){
      g.addedge(blo[i].first, blo[i].second);
    }
  }

  rep(i,n){
    cout << (uf.size(i)-g.graph[i].size()-1);
    if(i!=n-1){cout << " ";}
  }

}


Measured memory_bytes: 10624