#include <bits/stdc++.h>

using namespace std;
using ll = long long;

const int mod = 1000000007;

#define REP(i, n)  for(int i = 0; i < n; ++i)
#define FOR(i, t, n)  for(int i = t; i <= (int)n; ++i)

struct mint {
    ll x; // typedef long long ll;
    mint(ll x = 0) : x((x % mod + mod) % mod) {}

    mint operator-() const { return mint(-x); }

    mint &operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }

    mint &operator*=(const mint a) {
        (x *= a.x) %= mod;
        return *this;
    }

    mint operator+(const mint a) const {
        mint res(*this);
        return res += a;
    }

    mint operator-(const mint a) const {
        mint res(*this);
        return res -= a;
    }

    mint operator*(const mint a) const {
        mint res(*this);
        return res *= a;
    }

    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const {
        return pow(mod - 2);
    }

    mint &operator/=(const mint a) {
        return (*this) *= a.inv();
    }

    mint operator/(const mint a) const {
        mint res(*this);
        return res /= a;
    }
};


class Eratosthenes {
public:
    vector<bool> prime;

    Eratosthenes(ll size) {
        prime.resize(size, 1);
        prime[0] = 0;
        prime[1] = 0;
        for (size_t i = 2; i * i <= size; ++i)
            if (prime[i]) {
                for (size_t j = 2; i * j <= size; ++j)prime[i * j] = false;
            }
    }
};


class Combination {
    vector<ll> fac; //n!(mod M)
    vector<ll> ifac; //k!^{M-2} (mod M)
public:
    Combination(ll size) {
        fac.resize(size);
        ifac.resize(size);
        fac[0] = 1;
        ifac[0] = 1;
        for (ll i = 0; i < size; i++) {
            fac[i + 1] = fac[i] * (i + 1) % mod;
            ifac[i + 1] = ifac[i] * mpow(i + 1, mod - 2) % mod;
        }
    }

    ll mpow(ll x, ll n) {
        ll ans = 1;
        while (n != 0) {
            if (n & 1) ans = ans * x % mod;
            x = x * x % mod;
            n = n >> 1;
        }
        return ans;
    }

    ll comb(ll a, ll b) {
        if (a == 0 && b == 0)return 1;
        if (a < b || a < 0)return 0;
        ll tmp = ifac[a - b] * ifac[b] % mod;
        return tmp * fac[a] % mod;
    }
};


ll GCD(ll a, ll b) {
    if (b == 0)return a;
    return GCD(b, a % b);
}

ll LCM(ll a, ll b) {
    ll gcd = GCD(a, b);
    return a / gcd * b;
}


struct SegmentTree {
private:
    int n;
    vector<ll> node;

public:
    SegmentTree(vector<ll> v) {
        int sz = v.size();
        n = 1;
        while (n < sz) n *= 2;
        node.resize(2 * n - 1, 0);
        for (int i = 0; i < sz; i++) node[i + n - 1] = v[i];
        for (int i = n - 2; i >= 0; i--) node[i] = (node[2 * i + 1] | node[2 * i + 2]);
    }

    void update(int x, ll val) {
        x += (n - 1);
        node[x] = val;
        while (x > 0) {
            x = (x - 1) / 2;
            node[x] = node[2 * x + 1] | node[2 * x + 2];
        }
    }

    ll getLR(int a, int b, int k = 0, int l = 0, int r = -1) {
        if (r < 0) r = n;

        if (r <= a || b <= l) return 0;

        if (a <= l && r <= b) return node[k];

        ll vl = getLR(a, b, 2 * k + 1, l, (l + r) / 2);
        ll vr = getLR(a, b, 2 * k + 2, (l + r) / 2, r);
        return (vl | vr);
    }
};

struct UnionFind {
    vector<ll> par;
    vector<ll> siz;

    UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) {
        for (ll i = 0; i < sz_; ++i) par[i] = i;
    }

    void init(ll sz_) {
        par.resize(sz_);
        siz.assign(sz_, 1LL);
        for (ll i = 0; i < sz_; ++i) par[i] = i;
    }

    ll root(ll x) {
        while (par[x] != x) {
            x = par[x] = par[par[x]];
        }
        return x;
    }

    bool merge(ll x, ll y) {
        x = root(x);
        y = root(y);
        if (x == y) return false;
        if (siz[x] < siz[y]) swap(x, y);
        siz[x] += siz[y];
        par[y] = x;
        return true;
    }

    bool issame(ll x, ll y) { // 連結判定
        return root(x) == root(y);
    }

    ll size(ll x) {
        return siz[root(x)];
    }
};

ll n, k;


int main() {
    ll n, m, k;
    cin >> n >> m >> k;
    vector<ll> A(n);
    UnionFind unionFind(n);
    REP(i, m) {
        ll a, b;
        cin >> a >> b;
        a--;
        b--;
        unionFind.merge(a, b);
        A[a]--;
        A[b]--;
    }
    REP(i, k) {
        ll c, d;
        cin >> c >> d;
        c--;
        d--;
        if (unionFind.root(c) == unionFind.root(d)) {
            A[c]--;
            A[d]--;

        }
    }
    REP(i, n) {
        cout << unionFind.size(unionFind.root(i)) + A[i] - 1 << endl;
    }
    return 0;
}


Measured memory_bytes: 3200