#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include<cmath>
#include<limits>
#define ll long long
#define ALL(x) (x).begin(),(x).end()
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define int_INF 2147483647
#define pint_INF 2000000000
#define ll_INF 	9223372036854775807
#define MOD 100000007
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define pii pair<int,int>
#define vpii vector<pair<int,int>>
using namespace std;

struct DisjointSet {
public:
    vector<int> rank, parent, elements;

    DisjointSet(int size) {
        rank.resize(size, 0);
        parent.resize(size, 0);
        elements.resize(size, 0);

        for (int i = 0; i < size; i++) {
            makeSet(i);
        }
    }

    void makeSet(int x) {
        parent[x] = x;
        rank[x] = 0;
        elements[x] = 1;
    }

    bool isSame(int x, int y) {
        return findSet(x) == findSet(y);
    }

    void unite(int x, int y) {
        link(findSet(x), findSet(y));
    }

    void link(int x, int y) { // x and y are guaranteed to be a root
        if (!isSame(x, y)) {
            if (rank[x] > rank[y]) {
                elements[x] += elements[y];
                parent[y] = x;
            }
            else {
                elements[y] += elements[x];
                parent[x] = y;
                if (rank[x] == rank[y]) {
                    rank[y]++;
                }
            }
        }  
    }

    int findSet(int x) {
        if (x != parent[x]) {
            parent[x] = findSet(parent[x]);
        }

        return parent[x];
    }

    int Elem_of_tree(int x) {
        return elements[findSet(x)];
    }

};
int main() {
    int N, M, K; cin >> N >> M >> K;
    vector<pii> AB(M), CD(K);

    rep(i, M) {
        int x, y; cin >> x >> y;
        x--; y--;
        AB[i] = { x,y };
    }// Direct Friends
    rep(i, K) {
        int x, y; cin >> x >> y;
        x--; y--;
        CD[i] = { x,y };
    }
    DisjointSet D(N);
    rep(i, M) {
        D.unite(AB[i].first, AB[i].second);
    }
    vi Ans(N, 0);
    //このタイミングでリフレッシュ必要
    
    rep(i, N) {
        Ans[i] = D.Elem_of_tree(i) - 1;
    }
    rep(j, M) {
        if (D.isSame(AB[j].first, AB[j].second)) { // AB contains direct Friends
            Ans[AB[j].first]--;
            Ans[AB[j].second]--;
        }
    }
    rep(k, K) {
        if (D.isSame(CD[k].first, CD[k].second)) {
            Ans[CD[k].first]--;
            Ans[CD[k].second]--;
        }
    }
    vi v = D.elements;

    rep(i, N) {
        cout << Ans[i] << " ";
    }
    cout << endl;
}


Measured memory_bytes: 4352