//Dragon_warrior7(IITK)
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;
#define ll long long
#define pb push_back
#define nl cout << '\n'
#define sor(x) sort(x.begin(), x.end())
#define rev(v) reverse(v.begin(), v.end())
#define lb(v, temp) lower_bound(v.begin(), v.end(), temp)
#define ub(v, temp) upper_bound(v.begin(), v.end(), temp)
#define fi first
#define se second
#define llmax 1000000000000000000
#define pll pair<ll, ll> 
#define ull unsigned ll
#define vll vector<ll> 
#define rub cout << "\n------------------------------------\n"
#define deb(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }

void err(istream_iterator<string> it) {}
template<typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) 
{
	cout << *it << " = " << a;
	nl;
	err(++it, args...);
}
//typedef  tree < int ,  null_type ,  greater<int> ,  rb_tree_tag ,  tree_order_statistics_node_update > oset;
void read(vector<ll> &v)
{
	for (int i = 0; i < v.size(); i++)
		cin >> v[i];
}
// const int mod=1e9+7;
// ll power(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
// ll modInverse(ll a){return power(a,mod-2);}
ll n,m,a,b,c,k,temp,x,y;
ll s[100000+1];
class DisjSet { 
    int *rank, *parent, n; 
  
public: 
    DisjSet(int n) 
    { 
        rank = new int[n]; 
        parent = new int[n]; 
        this->n = n; 
        makeSet(); 
    } 
    void makeSet() 
    { 
        for (int i = 0; i < n; i++) { 
            parent[i] = i; 
        } 
    } 
    int find(int x) 
    { 
        if (parent[x] != x) { 
            parent[x] = find(parent[x]); 
        } 
        return parent[x]; 
    } 
    void Union(int x, int y) 
    { 
        int xset = find(x); 
        int yset = find(y); 
        if (xset == yset) 
            return; 
        if (rank[xset] < rank[yset]) { 
            parent[xset] = yset;
            s[yset]+=s[xset];
        } 
        else if (rank[xset] > rank[yset]) { 
            parent[yset] = xset; 
              s[xset]+=s[yset];
        } 
        else { 
            parent[yset] = xset; 
              s[xset]+=s[yset];
            rank[xset] = rank[xset] + 1; 
        } 
    } 
}; 

void solveforthiscase(const int & test)
{//deb(test);
cin>>n;
class DisjSet p(n+100);
for(int i=1;i<=n;i++)
{
    s[i]=1;
}
cin>>m;
cin>>k;
vll v[2*100000+1];
vll bl[2*100000+1];
while(m--)
{
   cin>>a>>b;
   p.Union(a,b);
   v[a].pb(b);
   v[b].pb(a);
}
vector<ll> ans(n+100);
for(int i=1;i<=n;i++)
{
    ans[i]=s[p.find(i)]-1-v[i].size();
}
while(k--)
{
    cin>>a>>b;
    bl[a].pb(b);
    bl[b].pb(a);
}
for(int i=1;i<=n;i++)
{
    for(auto x:bl[i])
    {
        if(p.find(x)==p.find(i))
        {
            ans[i]--;
        }
    }
}
for(int i=1;i<=n;i++)
{
    cout<<ans[i]<<' ';
}








return ;
}
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int test=1;
// 	cin>>test;
    for(int i=1;i<=test;i++)
    {
        solveforthiscase(i);
    }
}

Measured memory_bytes: 19712