#include "bits/stdc++.h"
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL<<60;
const long long int Mod = 1000000007;
using ll = long long int; using ci = const int;
using vi = vector<int>;  using Vi = vector<long long int>;
using P = pair<int, int>;  using PLL = pair<ll, ll>;
using matrix = vector<vector<ll>>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
#define all(x) (x).begin(),(x).end()
#define rep(i,N) for(ll i = 0; i < (ll)N; i++)
#define repi(i,a,b) for(ll i = ll(a); i < ll(b); ++i)
template<class T>bool chmax(T &former, const T &b) { if (former<b) { former=b; return true; } return false; }
template<class T>bool chmin(T &former, const T &b) { if (b<former) { former=b; return true; } return false; }
template<class T>T sqar(T x){ return x*x; }//sqrt(x)は平方根;
#define Sort(v) std::sort(v.begin(), v.end(), std::greater<decltype(v[0])>()) //降順でVをソート
#define p_queue(v) priority_queue<v, vector<v>, greater<v> >
template<class T> inline void princ(T x){cout<<x<<" ";}; 
template<class T> inline void print(T x){cout<<x<<"\n";};
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
///////////////////////////////////////////////////////////////////////////////////

ll n,m,k;
struct edge{/*重み付き,有向*/
    int to , cost;/*toは接続先*/
    edge(ll to_ ,ll cost_ = 1){ to=to_; cost=cost_; };/*全てのcost=1 <=> 無向グラフ*/
};
bool operator<(edge e1 ,edge e2){return e1.cost < e2.cost; }
bool operator>(edge e1 ,edge e2){return e1.cost > e2.cost; }
using graph =  vector< vector<edge> >;
graph g;
matrix mx,bl;

vector<bool> ck;
void dfs(ll now,Vi& v){
    if(ck[now])return;
    ck[now]=true;
    v.pb(now);
    rep(i,g[now].size()){
        dfs(g[now][i].to,v);
    }
}
struct union_find{
    vector<int> par;
    int par_siz;
    union_find(int n) : par(n){
        par_siz = n;
        for(ll i=0;i<n;i++)par[i]=-1; //init
    }
    int root(int x){
        if(par[x]<0)return x;
        else return par[x] = root(par[x]);
    }
    void unite(int p1,int p2){
        int pa1 = root(p1),pa2 = root(p2);
        if(pa1==pa2)return;
        if(par[pa1]>par[pa2]){ // |pa1| < |pa2|
            par[pa2] += par[pa1];
            par[pa1] = pa2;
        }else{ // |pa1| >= |pa2|
            par[pa1] += par[pa2];
            par[pa2] = pa1;
        }
        par_siz--;
    }
    int size(int x){ return (-1)*par[root(x)]; }
    int par_size(){return par_siz;}
    bool same(int p1,int p2){ return root(p1) == root(p2); }
};

int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    std::cout<<std::fixed<<std::setprecision(30);
    cin>>n>>m>>k;
    g.resize(n);
    union_find uf(n);
    ck.resize(n,false);
    ll aa,bb;
    Vi ans(n,0);
    rep(i,m){
        cin>>aa>>bb;
        g[aa-1].pb(edge(bb-1));
        g[bb-1].pb(edge(aa-1));
        uf.unite(aa-1,bb-1);
    }
    set<PLL> bl;
    rep(i,k){
        cin>>aa>>bb;
        aa--;bb--;
        if(uf.same(aa,bb)){
            ans[aa]--;
            ans[bb]--;
        }
    }
    matrix ma;
    rep(i,n){
        if(ck[i])continue;
        Vi v;
        dfs(i,v);
        ma.pb(v);
    }
    rep(i,ma.size()){
        rep(j,ma[i].size()){

        }
    }
    rep(i,ma.size()){
        rep(j,ma[i].size()){
            ll tmp = ma[i].size() - g[ma[i][j]].size() -1;
            ans[ma[i][j]]+=tmp;
        }
    }
    rep(i,n){
        princ(ans[i]);
    }
    print("");
    return 0;
}

Measured memory_bytes: 12028