#include <bits/stdc++.h>
#include <bitset>
#include <cassert>
#include <cstring>
#include <functional>
#include <iomanip>
#include <list>
#include <cmath>
#include <memory>
#include <queue>
#include <set>
#include <stack>
#include <vector>
// #include <boost/multiprecision/cpp_dec_float.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
#define REP(i, n) for (int64_t i = 0; i < (int64_t)n; i++)
#define REP_FOR(i, a, b) for (int64_t i = (int64_t)a; i < (int64_t)b; i++)
#define REP_REV(i, a, b) for (int64_t i = (int64_t)a; i > (int64_t)b; i--)
#define FORALL(v) (v).begin(), (v).end()
#define mp(a, b) make_pair(a, b)
#define eb(x) emplace_back(x)
#define F first
#define S second
typedef long long ll;
typedef long double ld;
typedef pair<int64_t, int64_t> pii;
typedef pair<ll, ll> pll;
typedef pair<ld, ld> pdd;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<int64_t> vii;
typedef vector<vii> vvii;
const ll mod = 1e9 + 7;
const int64_t infi = 1147483600;
const ll infl = 4e18 + 5;
const char EOL = '\n';
//cout << fixed << setprecision(17) << res << endl;
// const ll MOD = 1000000009;


int main() {
    ll n, m, k;
    cin >> n >> m >> k;
    vector<ll> uftree(n+1, 0);
    vector<ll> ufcount(n+1, 1);
    vector<ll> nfriend(n+1, 0);
    vector<ll> blocked(n+1, 0);

    for (ll i = 0; i < m; ++i) {
        ll a, b;
        cin >> a >> b;
        if (a > b) {
            auto tmp = a;
            a = b;
            b = tmp;
        }
        nfriend[a] += 1;
        nfriend[b] += 1;

        ll roota, rootb;
        roota = uftree[a];
        if (roota == 0) {
            roota = a;
        } else {
            while(uftree[roota] != 0) {
                roota = uftree[roota];
            }
        }
        if (roota != 0 && roota != a)  uftree[a] = roota;

        rootb = uftree[b];
        if (rootb == 0) {
            rootb = b;
        } else {
            while(uftree[rootb] != 0) {
                rootb = uftree[rootb];
            }
        }
        if (rootb != 0 && rootb != b) uftree[b] = rootb;

        if (roota != rootb) {
            auto root = min(roota, rootb);
            if (roota != root) uftree[roota] = root;
            if (rootb != root) uftree[rootb] = root;
            ufcount[root] = ufcount[roota] + ufcount[rootb];
        }
    }

    for (ll i = 0; i < k; ++i) {
        ll c , d;
        cin >> c >> d;
        ll rootc, rootd;
        rootc = uftree[c];
        if (rootc == 0) {
            rootc = c;
        } else {
            while(uftree[rootc] != 0) {
                rootc = uftree[rootc];
            }
        }
        if (rootc != 0 && rootc != c)  uftree[c] = rootc;

        rootd = uftree[d];
        if (rootd == 0) {
            rootd = d;
        } else {
            while(uftree[rootd] != 0) {
                rootd = uftree[rootd];
            }
        }
        if (rootd != 0 && rootd != d) uftree[d] = rootd;

        if (rootc == rootd && rootc != 0) {
            blocked[c] += 1;
            blocked[d] += 1;
        }
    }

    //cerr << "uftree: ";
    //for (ll i = 1; i <= n; ++i) {
    //    cerr << uftree[i] << ",";
    //}
    //cerr << endl;
    //cerr << "ufcount: ";
    //for (ll i = 1; i <= n; ++i) {
    //    cerr << ufcount[i] << ",";
    //}
    //cerr << endl;
    //cerr << "nfriend: ";
    //for (ll i = 1; i <= n; ++i) {
    //    cerr << nfriend[i] << ",";
    //}
    //cerr << endl;
    //cerr << "blocked: ";
    //for (ll i = 1; i <= n; ++i) {
    //    cerr << blocked[i] << ",";
    //}
    //cerr << endl;

    for (ll i = 1; i <= n; ++i) {
        auto root = uftree[i];
        if (root == 0) {
            root = i;
        } else {
            while (uftree[root] != 0) {
                root = uftree[root];
            }
        }
        auto res = ufcount[root];
        res = res - nfriend[i] - blocked[i] - 1;
        cout << res << " ";
    }
    cout << endl;
}


Measured memory_bytes: 3968