#include <bits/stdc++.h>
#define endl '\n'
#define ALL(v) std::begin(v), std::end(v)
#define ALLR(v) std::rbegin(v), std::rend(v)
using ll = std::int64_t;
using ull = std::uint64_t;
using pll = std::pair<ll, ll>;
using tll = std::tuple<ll, ll, ll>;
template <typename T> using vec = std::vector<T>;
template <typename T> using vvec = vec<vec<T>>;
template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return std::min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return std::max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return std::max(low, std::min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { return t = clamp(t, low, high); }
namespace init__ { struct InitIO { InitIO() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(30); } } init_io; }
#define mv_rec make_v(init, tail...)
template <typename T> T make_v(T init) { return init; }
template <typename T, typename... Tail> auto make_v(T init, size_t s, Tail... tail) { return vec<decltype(mv_rec)>(s, mv_rec); }
#undef mv_rec


namespace graph {

using Node = ll;
using Weight = ll;
using Edge = std::pair<Node, Weight>;

template <bool Directed>
struct Graph : public vvec<Edge> {
    using vvec<Edge>::vvec;

    void add_edge(Node f, Node t, Weight w = 1) {
        (*this)[f].emplace_back(t, w);
        if (!Directed) (*this)[t].emplace_back(f, w);
    }

    Graph<Directed> build_inv() const {
        Graph<Directed> ret(this->size());
        for (Node i = 0; i < this->size(); i++) {
            for (const Edge &e : (*this)[i]) {
                Node j;
                Weight w;
                std::tie(j, w) = e;
                if (!Directed && j < i) continue;
                ret.add_edge(j, i, w);
            }
        }

        return ret;
    }
};

}

namespace tree {

struct UnionFind {
    vec<ll> rank, par;
    vec<ssize_t> sz;

    UnionFind(ll n) : rank(n, 1), par(n), sz(n, 1) {
        iota(ALL(par), 0);
    }

    ll find(ll n) {
        return (n == par[n] ? n : par[n] = find(par[n]));
    }

    bool unit(ll x, ll y) {
        ll px = find(x), py = find(y);
        if (px == py) return false;
        if (rank[px] < rank[py]) std::swap(px, py);
        par[py] = px;
        rank[px] += (rank[px] == rank[py]);
        sz[px] += sz[py];
        return true;
    }

    bool same(ll x, ll y) {
        return find(x) == find(y);
    }

    ssize_t size(ll n) {
        return sz[find(n)];
    }
};

}

using namespace std;

int main() {
    ll n, m, k;
    cin >> n >> m >> k;
    graph::Graph<false> fr(n), bl(n);
    tree::UnionFind uf(n);
    for (ll i = 0; i < m; i++) {
        ll a, b;
        cin >> a >> b;
        a--; b--;
        fr.add_edge(a, b);
        uf.unit(a, b);
    }
    for (ll i = 0; i < k; i++) {
        ll c, d;
        cin >> c >> d;
        bl.add_edge(c - 1, d - 1);
    }
    vec<ll> ans(n);
    for (ll i = 0; i < n; i++) {
        ll sz = uf.size(i);
        sz -= fr[i].size();
        for (auto &&e : bl[i]) {
            ll nxt;
            tie(nxt, ignore) = e;
            if (uf.same(i, nxt)) sz--;
        }
        ans[i] = sz - 1;
    }
    for (ll i = 0; i < n; i++) cout << ans[i] << " \n"[i + 1 == n];
    return 0;
}


Measured memory_bytes: 19584