#include<algorithm>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<map>
#include<cstdio>
#include<iomanip>
#include<cmath>
using namespace std;

int main(){
    int N, M, K;
    cin >> N >> M >> K;
    int lastId = 0;
    vector< pair<int, int> > friendEdges;
    vector< pair<int, int> > blockEdges;
    vector< vector<int> > groups;
    vector<int> groupId = vector<int>(N, -1);
    vector<int> friends = vector<int>(N, 0);
    vector<int> blockInSameGroup = vector<int>(N, 0);

    for (int m = 0; m < M; m++) {
        pair<int, int> p;
        cin >> p.first >> p.second;
        p.first--;
        p.second--;
        friendEdges.push_back(p);
    }
    
    for (int k = 0; k < K; k++) {
        pair<int, int> p;
        cin >> p.first >> p.second;
        p.first--;
        p.second--;
        blockEdges.push_back(p);
    }
    
    sort(friendEdges.begin(), friendEdges.end());
    
    for (int m = 0; m < M; m++) {
        pair<int, int> edge = friendEdges[m];
        int gId1 = groupId[edge.first];
        int gId2 = groupId[edge.second];
        if (gId1 == -1 && gId2 == -1) {
            groupId[edge.first] = lastId;
            groupId[edge.second] = lastId;
            vector<int> newGroup;
            newGroup.push_back(edge.first);
            newGroup.push_back(edge.second);
            groups.push_back(newGroup);
            lastId++;
        } else if (gId1 == -1 && gId2 != -1) {
            groupId[edge.first] = gId2;
            groups[gId2].push_back(edge.first);
        } else if (gId1 != -1 && gId2 == -1) {
            groupId[edge.second] = gId1;
            groups[gId1].push_back(edge.second);
        } else if (gId1 != gId2) {
            if (groups[gId1].size()< groups[gId2].size()) {
                for (int i = 0; i < groups[gId1].size(); i++) {
                    groups[gId2].push_back(groups[gId1][i]);
                    groupId[groups[gId1][i]] = gId2;
                }
                groups[gId1].clear();
            } else {
                for (int i = 0; i < groups[gId2].size(); i++) {
                    groups[gId1].push_back(groups[gId2][i]);
                    groupId[groups[gId2][i]] = gId1;
                }
                groups[gId2].clear();
            }
        }
        
        friends[edge.first]++;
        friends[edge.second]++;
    }
    
    for (int k = 0; k < K; k++) {
        pair<int, int> edge = blockEdges[k];
        if (groupId[edge.first] == groupId[edge.second] && groupId[edge.first] != -1) {
            blockInSameGroup[edge.first]++;
            blockInSameGroup[edge.second]++;
        }
    }
 
//    cout << endl;
//     for (int i = 0; i < lastId; i++) {
//         for (int j = 0; j < groups[i].size(); j++) {
//             cout << groups[i][j] << ", ";
//         }
//         cout << endl;
//     }
//     cout << endl;
//     for (int i = 0; i < N; i++) {
//         cout << groupId[i] << ", ";
//     }
//     cout << endl;
//
//    cout << endl;
//    for (int i = 0; i < N; i++) {
//        cout << friends[i] << ", ";
//    }
//    cout << endl;
//
    for (int i = 0; i < N; i++) {
        if (groupId[i] == -1) {
            cout << "0";
        } else {
            cout << groups[groupId[i]].size() - friends[i] - blockInSameGroup[i] - 1;
        }
        if (i != (N - 1)) {
            cout << " ";
        }
    }
}

Measured memory_bytes: 6900