#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/rope>

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define long long long 
#define PI 3.141592653589793238

#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cout << name << " : " << arg1 << endl;
        //use cerr if u want to display at the bottom
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
    }
#else
#define trace(...)
#endif

typedef trie<string,null_type,trie_string_access_traits<>,pat_trie_tag,trie_prefix_search_node_update> pref_trie;
typedef tree<long int,null_type,less<long int>,rb_tree_tag,tree_order_statistics_node_update>ordered_set;
typedef cc_hash_table<long int,long int, hash<long int>, equal_to<long int>, direct_mask_range_hashing<long int>, 
hash_standard_resize_policy<hash_exponential_size_policy<>, hash_load_check_resize_trigger<true>, true>> ht;
typedef gp_hash_table<long int,long int> HashTable;

    
class DisjointSet{
    vector<long int> parent, size;
    long int n, connected;


    public:
        DisjointSet(long int n) : n(n){
            parent.resize(n);
            size.resize(n);
            for(long int i = 0; i < n; i++){
                parent[i] = i;
                size[i] = 1;
            }
            connected = n;
        }
        void join(long int a,long int b){
            long int x = findParent(a);
            long int y = findParent(b);
            
            if(x == y)
                return;
            connected--;

            if(size[x] > size [y])
                swap(x, y);
 
            size[y] += size[x];
            size[x] = 0;
            parent[x] = parent[y];
            
        }
        long int findParent(long int a){
            if(a == parent[a])
                return a;
            return parent[a] = findParent(parent[a]); 
        }
        
        long int getSize(long int k){
            return size[findParent(k)];
        }
};
    

int main(){
   IOS;
 /*    #ifndef ONLINE_JUDGE
         freopen("in.txt",  "r",  stdin);
         freopen("out.txt", "w", stdout);
     #endif */
   
   long int n,m,k;
   cin>>n>>m>>k;

   vector<vector<long int>> g(n);
   DisjointSet ds(n);

   for(long int i = 0; i < m; i++){
     long int a,b;
     cin>>a>>b;
     ds.join(a - 1, b - 1);
     g[a - 1].push_back(b - 1);
     g[b - 1].push_back(a - 1);
   }

   vector<vector<long int>> rev(n);

   for(long int i = 0; i < k; i++){
      long int a,b;
      cin>>a>>b;

      if(ds.findParent(a - 1) != ds.findParent(b - 1))
        continue;

      rev[a - 1].push_back(b - 1);
      rev[b - 1].push_back(a - 1);
   }


   for(long int i = 0; i < n; i++){
      long int friends = g[i].size();
      long int enemy = rev[i].size();

      long int opp = ds.getSize(i) - friends - 1 - enemy;
      cout<<opp<<" ";
   }

   return 0;
}

Measured memory_bytes: 14580