//
//  main.cpp
//

#include <algorithm>
#include <array>
#include <assert.h>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <memory>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

using ll = int64_t;
using ull = uint64_t;
constexpr ll LL_MAX = numeric_limits<ll>::max();
constexpr ull ULL_MAX = numeric_limits<ull>::max();

template<typename T>
vector<T> make_vec_nd(T init, ll size) {
	return vector<T>(size, init);
}
template<typename T, typename... Args>
auto make_vec_nd(T init, ll size, Args... rest) {
	auto inner = make_vec_nd(init, rest...);
	return vector<decltype(inner)>(size, inner);
}

#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define rrep(i, a, b) for (ll i = (a)-1; i >= (b); i--)

struct UnionFind {
    vector<size_t> parent;
    vector<size_t> rank;
    size_t find_parent(size_t x) {
        if (parent[x] == x) {
            return x;
        } else {
            parent[x] = find_parent(parent[x]);
            return parent[x];
        }
    }
    explicit UnionFind(size_t size) {
        parent.resize(size);
        rank.resize(size);
        for (size_t i = 0; i < size; i++) {
            parent[i] = i;
            rank[i] = 0;
        }
    }
    virtual ~UnionFind() {}
    void unite(size_t x, size_t y) {
        size_t px = find_parent(x);
        size_t py = find_parent(y);
        if (px == py) {
            return;
        }
        if (rank[px] < rank[py]) {
            parent[px] = py;
        } else if (rank[px] > rank[py]) {
            parent[py] = px;
        } else {    // rank[px] == rank[py]
            parent[py] = px;
            rank[px]++;
        }
    }
    bool is_same(size_t x, size_t y) {
        return find_parent(x) == find_parent(y);
    }
    unordered_map<size_t, set<size_t>> create_map_parent_to_elements() {
        unordered_map<size_t, set<size_t>> ans;
        for (size_t i = 0; i < parent.size(); i++) {
            ans[find_parent(i)].insert(i);
        }
        return ans;
    }
};

int main() {
    ll N, M, K;
    cin >> N >> M >> K;
    vector<pair<ll, ll>> friend_rels(M);
    rep(i,0,M) {
        ll a, b;
        cin >> a >> b;
        a--;
        b--;
        friend_rels[i] = {a, b};
    }
    vector<pair<ll, ll>> block_rels(K);
    rep(i,0,K) {
        ll a, b;
        cin >> a >> b;
        a--;
        b--;
        block_rels[i] = {a, b};
    }
    UnionFind tree(N);
    for (auto& p : friend_rels) {
        tree.unite(p.first, p.second);
    }
    vector<ll> friend_cnt(N);
    for (auto& p : friend_rels) {
        if (tree.is_same(p.first, p.second)) {
            friend_cnt[p.first]++;
            friend_cnt[p.second]++;
        }
    }
    vector<ll> block_cnt(N);
    for (auto& p : block_rels) {
        if (tree.is_same(p.first, p.second)) {
            block_cnt[p.first]++;
            block_cnt[p.second]++;
        }
    }
    auto groups = tree.create_map_parent_to_elements();
    rep(i,0,N) {
        ll n = groups[tree.find_parent(i)].size();
        ll f = friend_cnt[i];
        ll b = block_cnt[i];
        cout << n - f - b - 1;
        if (i != N-1) {
            cout << " ";
        }
    }
    cout << endl;
}


Measured memory_bytes: 18464