#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using pii = pair<ll, ll>;
using vi = vector<ll>;
using vvi = vector<vi>;

template <class T>
using max_heap = priority_queue<T>;
template <class T>
using min_heap = priority_queue<T, vector<T>, greater<T>>;

template <class T, class U>
void chmax(T &a, U b) {
    if (a < b) a = b;
}
template <class T, class U>
void chmin(T &a, U b) {
    if (b < a) a = b;
}

#define rep(i, j) for (int i = 0; i < j; i++)
#define all(obj) (obj).begin(), (obj).end()
#define rall(obj) (obj).rbegin(), (obj).rend()
#define debug(x) cerr << #x << ": " << x << endl;
#define int ll

struct UnionFind {
    vector<int> par;

    UnionFind(int n) : par(n, -1) {}
    void init(int n) { par.assign(n, -1); }

    int root(int x) {
        if (par[x] < 0)
            return x;
        else
            return par[x] = root(par[x]);
    }

    bool issame(int x, int y) {
        return root(x) == root(y);
    }

    bool merge(int x, int y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        if (par[x] > par[y]) swap(x, y); // merge technique
        par[x] += par[y];
        par[y] = x;
        return true;
    }

    int size(int x) {
        return -par[root(x)];
    }
};

const ll mod = 1e9 + 7;
const ll inf = (1LL << 50);

unordered_set<int> es[100005];
unordered_set<int> block[100005];

void rec(int u, vector<bool> &used, set<int> &s) {
    if (used[u]) return;
    used[u] = true;

    for (auto v : es[u]) {
        s.insert(v);
        rec(v, used, s);
    }
    return;
};

void solve(long long N, long long M, long long K, std::vector<long long> A, std::vector<long long> B, std::vector<long long> C, std::vector<long long> D) {

    rep(i, M) {
        es[A[i]].emplace(B[i]);
        es[B[i]].emplace(A[i]);
    }
    rep(i, K) {
        block[C[i]].emplace(D[i]);
        block[D[i]].emplace(C[i]);
    }
    vector<bool> used(N, false);
    auto check = [&]() {
        rep(i, N) if (!used[i]) return i;
        return ll(-1);
    };

    vector<int> ans(N);
    int u = 0;
    while (u < N) {
        set<int> s;
        rec(u, used, s);
        u++;
        for (auto e : s) {
            if (u == e) u++;
            ans[e] = s.size() - 1;
            for (auto e2 : es[e])
                if (s.find(e2) != s.end()) ans[e]--;
            for (auto e2 : block[e])
                if (s.find(e2) != s.end()) ans[e]--;
        }
    }

    rep(i, N) {
        cout << ans[i];
        if (i != N - 1) cout << " ";
    }
    cout << endl;
    return;
}

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.precision(10);
    cout << fixed;

    long long N;
    scanf("%lld", &N);
    long long M;
    scanf("%lld", &M);
    long long K;
    scanf("%lld", &K);
    std::vector<long long> A(M);
    std::vector<long long> B(M);
    for (int i = 0; i < M; i++) {
        scanf("%lld", &A[i]);
        scanf("%lld", &B[i]);
        A[i]--, B[i]--;
    }
    std::vector<long long> C(K);
    std::vector<long long> D(K);
    for (int i = 0; i < K; i++) {
        scanf("%lld", &C[i]);
        scanf("%lld", &D[i]);
        C[i]--, D[i]--;
    }
    solve(N, M, K, std::move(A), std::move(B), std::move(C), std::move(D));
    return 0;
}


Measured memory_bytes: 41728