#include <bits/stdc++.h>
using namespace std;

int N, M, K, a, b, c, d;
map<int, set<int>> friendship;
map<int, set<int>> blockship;
vector<set<int>> islands;
map<int, int> keyToIndex;

ostream& operator<<(ostream& os, const set<int>& st) {
    for (int item : st) os << item << ", ";
    return os;
}

ostream& operator<<(ostream& os, const vector<set<int>>& v) {
    for (auto& st : v) os << st << endl;
    return os;
}

void constructIsland(int a, int b) {
    int idx1 = keyToIndex.find(a) != keyToIndex.end() ? keyToIndex[a] : -1;
    int idx2 = keyToIndex.find(b) != keyToIndex.end() ? keyToIndex[b] : -1;
    if (idx1 == -1 && idx2 == -1) {
        int indx = islands.size();
        keyToIndex[a] = indx;
        keyToIndex[b] = indx;
        islands.push_back({a, b});
    } else if (idx1 == -1) {
        islands[idx2].insert(a);
        keyToIndex[a] = idx2;
    } else if (idx2 == -1) {
        islands[idx1].insert(b);
        keyToIndex[b] = idx1;
    } else {
        int sz1 = islands[idx1].size();
        int sz2 = islands[idx2].size();
        int fromIdx = sz1 < sz2 ? idx1 : idx2;
        int toIdx = sz1 < sz2 ? idx2 : idx1;
        if (fromIdx == toIdx) return;
        for (int item : islands[fromIdx]) {
            islands[toIdx].insert(item);
            keyToIndex[item] = toIdx;
        }
        islands[fromIdx].clear();
    }
}

void debug(const vector<set<int>>& ck) {
    cout << ck << endl;
}

void debug(const map<int, int>& mp) {
    for (const auto p : mp) cout << p.first << "->" << p.second << " ";
    cout << endl;
}

int main()
{
    cin >> N >> M >> K;

    vector<pair<int, int>> vpiif;
    for (int i = 0; i < M; ++i) {
        cin >> a >> b;
        vpiif.emplace_back(a, b);
    }
    vector<pair<int, int>> vpiib;
    for (int i = 0; i < K; ++i) {
        cin >> c >> d;
        vpiib.emplace_back(c, d);
    }

    for (auto& p : vpiif) {
        friendship[p.first].insert(p.second);
        friendship[p.second].insert(p.first);
        constructIsland(p.first, p.second);
    }

    //debug(islands);
    //debug(keyToIndex);

    map<int, int> cntMap;
    for (int i = 1; i <= N; ++i) {
        int idx1 = keyToIndex.find(i) != keyToIndex.end() ? keyToIndex[i] : -1;
        if (idx1 == -1) continue;
        cntMap[i] = islands[idx1].size() - 1;
    }

    //debug(cntMap);

    for (auto& p : vpiib) {
        int idx1 = keyToIndex.find(p.first) != keyToIndex.end() ? keyToIndex[p.first] : -1;
        int idx2 = keyToIndex.find(p.second) != keyToIndex.end() ? keyToIndex[p.second] : -1;

        //cout << "[" << p.first << ", " << p.second << "], ";

        if (idx1 != -1 && islands[idx1].find(p.second) != islands[idx1].end()) {
            cntMap[p.first] -= 1;
        }
        if (idx2 != -1 && islands[idx2].find(p.first) != islands[idx2].end()) {
            cntMap[p.second] -= 1;
        }
    }

    //debug(cntMap);

    for (int i = 1; i <= N; ++i) {
        int myFriends = friendship.find(i) != friendship.end() ? friendship[i].size() : 0;
        if (cntMap.find(i) != cntMap.end()) {
            cout << (cntMap[i] -  myFriends) << " ";
        }
        else cout << 0 << " ";
    }
    cout << endl;
}


Measured memory_bytes: 37872