#include <bits/stdc++.h>
#include <boost/multiprecision/cpp_int.hpp>
using namespace std;
using bint = boost::multiprecision::cpp_int;
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repSE(i,s,n) for (int i = (s); i < (n); i++)
#define ssort(v) sort(v.begin(), v.end())
#define gsort(v) sort(v.rbegin(), v.rend())
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename T> ostream &operator<<(ostream &os, const vector<T> &vec){ os << "["; for (auto v : vec) os << v << ","; os << "]"; return os; }
template<typename T> ostream &operator<<(ostream &os, const deque<T> &vec){ os << "deq["; for (auto v : vec) os << v << ","; os << "]"; return os; }
template<typename T> ostream &operator<<(ostream &os, const set<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const unordered_set<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const multiset<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T> ostream &operator<<(ostream &os, const unordered_multiset<T> &vec){ os << "{"; for (auto v : vec) os << v << ","; os << "}"; return os; }
template<typename T1, typename T2> ostream &operator<<(ostream &os, const pair<T1, T2> &pa){ os << "(" << pa.first << "," << pa.second << ")"; return os; }
template<typename TK, typename TV> ostream &operator<<(ostream &os, const map<TK, TV> &mp){ os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; }
template<typename TK, typename TV> ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp){ os << "{"; for (auto v : mp) os << v.first << "=>" << v.second << ","; os << "}"; return os; }
template<typename T> bool chmax(T &m, const T q) { if (m < q) {m = q; return true;} else return false; }
template<typename T> bool chmin(T &m, const T q) { if (q < m) {m = q; return true;} else return false; }

void dfs(int n, vector<int> &comp, const vector<vector<int>> &G) {
    stack<int> S;
    vector<bool> seen;
    seen.assign(n, false);
    rep(i,n) {
        if (seen[i]) continue;
        // dfs
        S.push(i);
        while (!S.empty()) {
            int vertex = S.top();
            S.pop();
            seen[vertex] = true;
            comp[vertex] = i;
            rep(j, G[vertex].size()) {
                int neighbor = G[vertex][j];
                if (!seen[neighbor]) S.push(neighbor);
            }
        }
    }
}

int main()
{
    int N, M, K;
    cin >> N >> M >> K;
    vector<vector<int>> F(N);
    rep(i,M) {
        int a, b;
        cin >> a >> b;
        a--; b--;
        F[a].push_back(b);
        F[b].push_back(a);
    }
    vector<int> comp(N);
    dfs(N, comp, F);
    map<int, int> grSize;
    rep(i, N) grSize[comp[i]]++;
    vector<int> ans(N);
    rep(i, N) ans[i] = grSize[comp[i]] - F[i].size() - 1;
    rep(i,K) {
        int a, b;
        cin >> a >> b;
        a--; b--;
        if (comp[b] == comp[a]) {
            ans[a]--;
            ans[b]--;
        }
    }
    rep(i, N) cout << ans[i] << " ";
    cout << "\n";
    return 0;
}


Measured memory_bytes: 9516