#include <bits/stdc++.h>
#include <unordered_map>
#include <unordered_set>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
 
/*** Template Begins ***/
 
typedef long long    ll;
typedef pair<ll,ll>  pll;
typedef pair<ll, pair<int, int> > plll;
typedef vector<long long>  vll;
typedef vector<pll>  vp;
typedef long double ld;
#define pb           push_back
#define INF          INT_MAX/10
#define F            first
#define S            second
#define mp           make_pair
// #define ios          ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define hell         1000000007
// #define h 998244353
#define all(a)       (a).begin(),(a).end()
ll power(ll x, ll y, ll p)
{
  ll res = 1;
  x = x % p;
  while (y > 0)
  { 
    if (y & 1) 
      res = (res*x) % p;
    y = y>>1;
    x = (x*x) % p;
  } 
  return res; 
} 
const int MAXN = 1e5+7;

// Debug //
#define trace(x)                 cerr << #x << ": " << x << endl;
#define trace1(x)                cerr << #x << ": " << x << endl;
#define trace2(x, y)             cerr << #x << ": " << x << " | " << #y << ": " << y << endl;
#define trace3(x, y, z)          cerr << #x << ": " << x << " | " << #y << ": " << y << " | " << #z << ": " << z << endl;
#define trace4(a, b, c, d)       cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << endl;
#define trace5(a, b, c, d, e)    cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << endl;
// #define trace6(a, n,i;b, c, d, e, f) cerr << #a << ": " << a << " | " << #b << ": " << b << " | " << #c << ": " << c << " | " << #d << ": " << d << " | " << #e << ": " << e << " | " << #f << ": " << f << endl;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;

// Constants //
 
/*** Template Ends ***/
ll par[100005],sz[100005];
ll find(ll i)
{
  while(par[i]!=i)
  {
    par[i] = par[par[i]];
    i = par[i];
  }
  return i;
}
void Union(ll a,ll b)
{
  a = find(a);
  b = find(b);
  if(sz[a]<=sz[b])
  {
    par[a] = b;
    sz[b]+=sz[a];
  }
  else
  {
    par[b] = a;
    sz[a] += sz[b];
  }
}
void solve()
{
  ll n,m,k,i,a,b;
  cin>>n>>m>>k;
  vector<ll> adj[n+1];
  std::vector<ll> subtract(n+1,1);
  for(i=1;i<=n;i++)
  {
    par[i] = i;
    sz[i] = 1; 
  }
  for(i=0;i<m;i++)
  {
    cin>>a>>b;
    subtract[a]++;
    subtract[b]++;
    adj[a].pb(b);
    adj[b].pb(a);
    Union(a,b);
  }
  for(i=0;i<k;i++)
  {
    cin>>a>>b;
    if(find(a)==find(b))
    {
      subtract[a]++;
      subtract[b]++;
    }
  }
  std::vector<bool> vis(n+1,false);
  std::vector<ll> total(n+1,0);
  std::vector<ll> temp;
  for(i=1;i<=n;i++)
  {
    ll count=0;
    temp.clear();
    if(!vis[i])
    {
      queue<ll> q;
      q.push(i);
      vis[i]=true;
      while(!q.empty())
      {
        ll curr = q.front();
        temp.pb(curr);
        q.pop();
        count++;
        // trace2(curr,count);
        for(auto val : adj[curr])
        {
          if(!vis[val])
          {
            vis[val] = true;
            q.push(val);
          }
        }
      }
      for(auto val : temp)
        total[val] = count;
    }
  }

  for(i=1;i<=n;i++)
  {
    // trace2(total[i],subtract[i]);
    total[i]-=subtract[i];
    cout<<total[i]<<" ";

  }
}
int main()
{ 
  // ios;
  // fxreopen("inputt.txt", "w", stdout);
  ll t;
  // cin >> t;
  t=1;
  while(t--)
    solve();
  return 0;
}

Measured memory_bytes: 12020