#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i=x;i<(int)n;i++)
#define rep(i,n) REP(i,0,n)
#define sp(p) cout<<setprecision(16)<<fixed<<p<<endl;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(a))
#define UNIQ(a) unique(all(a))
#define UNIQNUM(a) UNIQ(a)-a.begin()
#define UNIQIT(a) a.erase(UNIQ(a), a.end());
#define VOUT(v,i) rep(i,v.size())cout<<v[i]<<(i==v.size()-1?"\n":" ");
#define VOUTDBG(v,i) cout<<#v<<": ";for(int i=0;i<(int)v.size();i++){cout<<v[i]<<" ";}cout<<"\n";
#define vout(v) VOUT(v,z);
#define vmin(v) *min_element(all(v))
#define vmax(v) *max_element(all(v))
#define vsum(v) accumulate(all(v), 0LL)
#define MOUT(m,r,c) rep(i,r){rep(j,c){cout<<m[i][j]<<" ";}cout<<endl;}
#define mout(m) MOUT(m,m.size(),m[0].size())
#define debg(a) cout<<#a<<": "<<a<<endl;
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define digit(a) to_string(a).length();
template<class T>inline int out(const T &t){ print(t); putchar('\n'); return 0; }
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef vector<ll> V;
// const long long MOD=1000000007;
const long long INF = 1e18;
#define EPS (1e-7)
#define PI (acos(-1))
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) { a = b; return true; }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) { a = b; return true; }
    return false;
}

struct UnionFind {
    vector<int> par; // par[i]: parent number of i
    vector<int> rank; // rank: depth of tree
    vector<int> cnt; // cnt of union

    UnionFind(int n){
        par.resize(n);
        rank.resize(n);
        cnt.resize(n);
        for(int i = 0; i < n; i++){
            par[i] = i;
            rank[i] = 0;
            cnt[i] = 1;
        }
    }

    // get root of x
    int root(int x) {
        if (par[x] == x) return x;
        return par[x] = root(par[x]);
    }

    // unite x and y
    void unite(int x, int y) {
        int rx = root(x);
        int ry = root(y);
        if (rx == ry) return;
        if(rank[rx]<rank[ry]){
            par[rx]=ry;
            cnt[ry]+=cnt[rx];
        }else{
            par[ry]=rx;
            cnt[rx]+=cnt[ry];
            if(rank[rx]==rank[ry]) rank[rx]++;
        }
    }

    bool same(int x, int y) {
        return root(x) == root(y);
    }
    int size(int x){
        return cnt[root(x)];
    }
};

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){
    UnionFind uf(N);
    vector<vector<ll>> friends(N);
    vector<vector<ll>> blocks(N);
    for (long long i = 0; i < M; i++) {
        A[i]--, B[i]--;
        uf.unite(A[i], B[i]);
        friends[A[i]].push_back(B[i]);
        friends[B[i]].push_back(A[i]);
    }
    for (long long i = 0; i < K; i++) {
        C[i]--, D[i]--;
        blocks[C[i]].push_back(D[i]);
        blocks[D[i]].push_back(C[i]);
    }
    vector<int> ret(N);
    for (long long i = 0; i < N; i++) {
        ret[i] = uf.size(i);
        for (auto& e: blocks[i]) {
            ret[i] -= uf.same(i,e);
        }
        ret[i] -= friends[i].size();
        ret[i]--;
    }
    vout(ret)
}

int main(){
    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]);
    }
    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]);
    }
    solve(N, M, K, std::move(A), std::move(B), std::move(C), std::move(D));
    return 0;
}


Measured memory_bytes: 17652