/*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします！
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/

#include <bits/stdc++.h>


#define f(i,n) for(int i=0;i<(n);i++)


#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)

#define intt long long
#define P pair<int,int>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=1;i<=n;i++)

using namespace std;

//Library
//モッドパウ
int modpow(int x, int y, int m = mod) {
    int res = 1;
    while (y) {
        if (y % 2) {
            res *= x;
            res %= m;
        }
        x = x * x % mod;
        y /= 2;
    }
    return res;
}

int mypow(int x, int y) {
    int res = 1;
    while (y) {
        if (y % 2) {
            res *= x;
        }
        x = x * x;
        y /= 2;
    }
    return res;
}
//is the number (x) a prime number?
bool prime(int x) {
    for (int i = 2; i * i <= x; i++) {
        if (!(x % i)) {
            return false;
        }
    }
    return true;
}


//saidai-kouyakusuu
inline int gcd(int x, int y) {
    if (!y) {
        return x;
    }
    return gcd(y, x % y);
}


//number of keta
int keta(int x) {
    int ans = 0;
    while (x) {
        x /= 10;
        ans++;
    }
    return ans;
}

//sum of keta
int ketasum(int x) {
    int ans = 0;
    while (x) {
        ans += x % 10;
        x /= 10;
    }
    return ans;
}

inline int lcm(int x, int y) {
    int ans = x / gcd(x, y) * y;
    return ans;
}
int twobeki(int x) {
    int ans = 0;
    while (1) {
        if (!(x & 1)) {
            ans++;
            x /= 2;
        }
        else {
            break;
        }
    }
    return ans;
}


template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
    if (lhs < rhs) {
        lhs = rhs;
        return 1;
    }
    return 0;
}
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
    if (lhs > rhs) {
        lhs = rhs;
        return 1;
    }
    return 0;
}
void Yes(){
    cout<<"Yes"<<endl;
}
void No(){
    cout<<"No"<<endl;
}
void YES(){
    cout<<"YES"<<endl;
}
void NO(){
    cout<<"NO"<<endl;
}


#define fin(i) scanf("%lld",&i)
#define fout(i) printf("%lld",i)
#define fendl printf("\n")
//Library-End
class Union_Find {
    vector<int> par;
    vector<int> rankmy;
public:
    Union_Find(int size) {
        par = vector<int>(size);
        rankmy = vector<int>(size);
        for (int i = 0; i < size; i++) {
            par[i] = i;
        }
    }
    
    int find(int x) {
        if (par[x] == x) {
            return x;
        }
        return par[x] = find(par[x]);
    }
    
    void unite(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) {
            return;
        }
        if (rankmy[x] < rankmy[y]) {
            par[x] = y;
        }
        else {
            par[y] = x;
            if (rankmy[x] == rankmy[y]) {
                rankmy[x]++;
            }
        }
    }
    
    bool same(int x, int y) {
        return find(x) == find(y);
    }
    
};

//Union-Find-End
int n,m,k,a[100004],b[100004],c[100004],d[100004],ans[100004];
vector<int> blo[100004];
int cnt[100004];
signed main() {
    cin>>n>>m>>k;
    Union_Find uni(n+10);
    rep(i,m){
        cin>>a[i]>>b[i];
        uni.unite(a[i], b[i]);
        blo[a[i]].push_back(b[i]);
        blo[b[i]].push_back(a[i]);
    }
    rep(i,k){
        cin>>c[i]>>d[i];
        blo[c[i]].push_back(d[i]);
        blo[d[i]].push_back(c[i]);
    }
    REP(i,n){
        cnt[uni.find(i)]++;
    }
    REP(i,n){
        ans[i]=cnt[uni.find(i)];
        rep(j,blo[i].size()){
            if (uni.same(i, blo[i][j])) {
                ans[i]--;
            }
        }
    }
    REP(i,n){
        cout<<ans[i]-1<<' ';
    }
    cout<<endl;
}


Measured memory_bytes: 15616