#include <bits/stdc++.h>
#include <boost/range/algorithm.hpp>
#include <boost/range/numeric.hpp>
#include <boost/integer/common_factor.hpp>
#include <boost/integer/common_factor_rt.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>

using std::string;
using std::vector;
using std::set;
using std::multiset;
using std::unordered_set;
using std::map;
using std::multimap;
using std::unordered_map;
using std::pair;
using std::cin;
using std::cout;

using boost::multiprecision::cpp_int;
using cpp_dec_float_1000 = boost::multiprecision::number<boost::multiprecision::cpp_dec_float<1000>>;

typedef uintmax_t    ull;
typedef intmax_t     ll;
typedef uint64_t     ul;
typedef uint32_t     ui;
typedef uint8_t      uc;

constexpr char CRLF  = '\n';
constexpr char SPACE = ' ';
constexpr char VECTOR_COUT_SEPARATOR = SPACE;
constexpr ll INF = 1000'000'007;
constexpr int MOD = 1000'000'007;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> std::ostream& operator<< (std::ostream& os, const std::vector<T>& vc) { for(auto it = vc.begin(); it != vc.end(); ++it) { if (std::next(it) == vc.end()) os << *it; else os << *it << VECTOR_COUT_SEPARATOR; } return os; }
template<class T1, class T2> inline std::ostream & operator<< (std::ostream & os, const std::pair<T1, T2> & p) { return os << p.first << ' ' << p.second; }
template<class T> T modinv(T a, T m) { T b = m, u = 1, v = 0; while (b) { T t = a / b; a -= t * b; boost::swap(a, b); u -= t * v; boost::swap(u, v); } u %= m; if (u < 0) u += m; return u; }

struct Tmp
{
public:
  Tmp(int N);
};

Tmp::Tmp(int N){}

struct UnionFind {
  typedef uintmax_t    ull;
  typedef intmax_t     ll;
  typedef uint64_t     ul;
  typedef uint32_t     ui;
  typedef uint8_t      uc;
  typedef std::pair<ui, ull> Pair;
  std::vector<std::pair<ui, Pair>> mNode;

  UnionFind(size_t N) : mNode(N)
  {
    for (int i = 0; i < N; ++i) {
      mNode[i] = {i, {1, 0}};
    }
  }

  ui root(ui x)
  {
    if (mNode[x].first == x) {
      return x;
    }
    else {
      return mNode[x].first = root(mNode[x].first);
    }
  }

  void unite_tree(ui x, ui y)
  {
    x = root(x);
    y = root(y);
    if (x == y) {
      return;
    }

    if (mNode[x].second.second < mNode[y].second.second) {
      mNode[x].first = y;
      mNode[y].second.first += mNode[x].second.first;
    }
    else {
      mNode[y].first = x;
      mNode[x].second.first += mNode[y].second.first;
      if (mNode[x].second.second == mNode[y].second.second) {
        ++mNode[x].second.second;
      }
    }
  }

  bool isSame(ui x, ui y)
  {
    return root(x) == root(y);
  }

  ui sizeOf(ui x)
  {
    return mNode[root(x)].second.first;
  }

};

void solve(void)
{
  int N, M, K; cin >> N >> M >> K;
  // vector<vector<int>> isFriend(N, vector<int>(N));
  // vector<vector<int>> isBlock(N, vector<int>(N));
  vector<int> friendCount(N);
  vector<int> blockCount(N);
  UnionFind uf(N);
  for (int _ = 0; _ < M; ++_) {
    int a, b; cin >> a >> b;
    --a; --b;
    uf.unite_tree(a, b);
    friendCount[a] += 1;
    friendCount[b] += 1;
  }
  for (int _ = 0; _ < K; ++_) {
    int c, d; cin >> c >> d;
    --c; --d;
    if (uf.isSame(c, d)) {
      blockCount[c] += 1;
      blockCount[d] += 1;
    }
  }
  for (int i = 0; i < N; ++i) {
    int sz = uf.sizeOf(i);
    sz -= 1;
    sz -= friendCount[i];
    sz -= blockCount[i];
    if (i == 0) {
      cout << std::max(sz, 0);
    }
    else {
      cout << SPACE << std::max(sz, 0);
    }
  }
  cout << CRLF;
  return;
}

int main(void)
{
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(0);

  solve();

  return 0;
}


Measured memory_bytes: 3968