//  Created by conan1024hao in 2020.
//  Copyright © 2020 conan1024hao. All rights reserved.
//  専用ライブラリです、自由にコピーして構いません。
//  感谢看我的代码！Wechat:conan1024hao Twitter/QQ:810396815
#pragma GCC optimize ("O3")
#include <iostream>
#include <iomanip>
#include <istream>
#include <ostream>
#include <sstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <utility>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <ctime>
#include <cctype>
#include <cstdlib>
#define IINF 10e8
#define INF 10e17
#define MOD 1000000007
#define mod 1000000007
#define rep(i, a, n) for (ll i = a; i < (ll)(n); i++)
#define Endl endl
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define mmax(x,y)(x>y?x:y)
#define mmin(x,y)(x<y?x:y)
#define chmax(x,y) x=mmax(x,y)
#define chmin(x,y) x=mmin(x,y)
#define all(x) (x).begin(),(x).end()
#define siz(x) (ll)(x).size()
#define PI acos(-1.0)
using namespace std;
//using Int=int_fast64_t;
typedef long long int ll;
typedef long long int LL;
typedef pair<ll,ll>Pll;
typedef pair<int,int>Pin;
template<class T> using V=vector<T>;
long long GCD(long long a, long long b) { return b ? GCD(b, a%b) : a; }
long long LCM(long long a, long long b)  {return a/GCD(a,b)*b;}
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int ddx[8]={-1,0,1,0,1,1,-1,-1};
int ddy[8]={0,-1,0,1,1,-1,1,-1};
char dir[4]={'u','l','d','r'};
ll cmp(pair<ll,ll>a,pair<ll,ll> b){
        if(a.fi!=b.fi)
        return a.fi<b.fi;
        else
        return a.se<b.se;
}
//---------------------------------------------------------------------------
struct unionfind{
    vector<int> rank,parent,size;
    unionfind(int n){
        for(int i=0;i<n;i++){
            rank.push_back(1);//树的高度
            parent.push_back(i);//根
            size.push_back(1);//树大小
        }
    }
    int getroot(int x){
        if(parent[x]==x)
            return x;
        return parent[x]=getroot(parent[x]);//押平路径加速以后的查找
    }
    bool issame(int a,int b){
        return getroot(a)==getroot(b);
    }
    void unite(int a,int b){
        a=getroot(a);
        b=getroot(b);
        if(a==b)
            return;
        else if(rank[a]>rank[b]){ //合并到高的树下
            parent[b]=a;
            size[a]+=size[b];
        }
        else if(rank[a]==rank[b]){
            parent[b]=a;
            rank[a]++;
            size[a]+=size[b];
        }
        else{
            parent[a]=b;
            size[b]+=size[a];
        }
    }
};

//---------------------------------------------------------------------------
int main(){//問題をちゃんと見ろ! llか? 统一类型 memset()! ペナを減らせ!!!!!!!!!!!!!
    cin.tie(0);
    ios::sync_with_stdio(false);
    //------------------------------
    int n,m,k;cin>>n>>m>>k;
    int lastans[100001];
    memset(lastans,0,sizeof(lastans));
    vector<int>aa(m),bb(m);
    vector<int>cc(k),dd(k);
    unionfind uf(n);
    for(int i=0;i<m;i++){
        int a,b;cin>>a>>b;if(a>b)swap(a,b);
        a--;b--;
        aa[i]=a;bb[i]=b;
        uf.unite(aa[i], bb[i]);
        lastans[aa[i]]--;
        lastans[bb[i]]--;
    }
    
    for(int i=0;i<k;i++){
        int c,d;cin>>c>>d;if(c>d)swap(c,d);
        c--;d--;
        cc[i]=c;dd[i]=d;
    }
    for(int i=0;i<k;i++){
        if(uf.issame(cc[i],dd[i])){
            lastans[cc[i]]--;
            lastans[dd[i]]--;
        }
    }
    /*while(cnt<n){
        bool abc=0;int start=-1;
        int tmp=0;
        vector<int>query;
        for(int i=0;i<n;i++){
            if(color[i]==0){
                if(abc==0){
                    abc=1;
                    start=i;
                    color[i]=1;
                    cnt++;
                    tmp++;
                    query.pb(i);
                }
                else{
                    if(uf.issame(start,i)){
                        color[i]=1;
                        cnt++;tmp++;
                        query.pb(i);
                    }
                }
            }
        }
        for(int i=0;i<query.size();i++){
            lastans[query[i]]+=tmp-1;
        }
    }*/
    for(int i=0;i<n;i++){
        ll node=uf.getroot(i);
        ll tmp=uf.size[node];
        lastans[i]+=mmax(tmp-1,0);
    }
    for(int i=0;i<n;i++)
        cout<<mmax(lastans[i],0)<<" ";
    cout<<endl;
    //------------------------------
    return 0;
}
//---------------------------------------------------------------------------
/*
int n;cin>>n;
vector<int>a(n);
for(int i=0;i<n;i++)
    cin>>a[i];
 */


Measured memory_bytes: 4204