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

struct Node{
    int rootId = -1;
    int totalNodeNum = 1;

};
vector <vector<int>> friendList;
vector <vector<int>> blockList;
vector <Node> preFriendNodeList;

int getUnionMemberNum(int nodeId, vector<Node>&nodeV){
    #if 0
    cout << "getUnionMemberNum" << endl;
    cout << nodeId << endl;
    #endif
    int myLeafSize = nodeV[nodeId].totalNodeNum;
    if(nodeV[nodeId].rootId==-1){
        //cout << "pathA" << endl;
        //cout << myLeafSize << endl;
        return myLeafSize;
    }else{
        //cout << "pathB" << endl;
        int secondHandLeafSize = getUnionMemberNum(nodeV[nodeId].rootId,nodeV);
        //cout << secondHandLeafSize << endl;
        return (secondHandLeafSize);
    }
}
void listUpId(int nodeId, vector<int>&v){
    // cout << "listUpId" << endl;
    // cout << nodeId << endl;
    v.push_back(nodeId);
    if(preFriendNodeList[nodeId].rootId==-1){
        return;
    }else{
        listUpId(preFriendNodeList[nodeId].rootId,v);
        return;    
    }
}
bool isUnioned(int nodeId1, 
                    int nodeId2, 
                    vector<Node>&nodeV){
    vector <int> nodelist1;
    vector <int> nodelist2;
    listUpId(nodeId1,nodelist1);
    listUpId(nodeId2,nodelist2);
    for(int i = 0; i < nodelist1.size(); i++){
        if(nodelist1[i]==nodeId2){
            return true;
        }
    }
    for(int i = 0; i < nodelist2.size(); i++){
        if(nodelist2[i]==nodeId1){
            return true;
        }
    }
    return false;
}
int getRootId(int id, vector<Node>&nodeV){
    if(id==-1)return id;
    if(nodeV[id].rootId==-1)return id;
    return getRootId(nodeV[id].rootId,nodeV);
}
void makeUnion(int nodeId1, 
                    int nodeId2, 
                    vector<Node>&nodeV){
    #if 0
    cout << "makeUnion" << endl;
    #endif

    if(isUnioned(nodeId1,nodeId2,nodeV)){
        //すでにunion済み
        return;
    }

    Node *node1 = &(nodeV[nodeId1]);
    Node *node2 = &(nodeV[nodeId2]);

    //大きい方をrootとする。
    int leaf1 = getUnionMemberNum(nodeId1,nodeV);
    int leaf2 = getUnionMemberNum(nodeId2,nodeV);
    int rootId1 = getRootId(nodeId1,nodeV);
    int rootId2 = getRootId(nodeId2,nodeV);
    if(rootId1==rootId2){
        //すでにunion済み
        return;
    }

    if(leaf1>leaf2){
        nodeV[rootId2].rootId=rootId1;
        nodeV[rootId1].totalNodeNum+=leaf2;
    }else{
        nodeV[rootId1].rootId=rootId2;
        nodeV[rootId2].totalNodeNum+=leaf1;
    }
    #if 0
    cout << nodeId1 << endl;
    cout << nodeId2 << endl;
    cout << rootId1 << endl;
    cout << rootId2 << endl;
    cout << nodeV[rootId1].totalNodeNum << endl;
    cout << nodeV[rootId2].totalNodeNum << endl;
    cout << endl;
    #endif
}
bool isInclude(int id, vector <int> &v){
    for(int i = 0; i < v.size(); i++){
        if(id==v[i]){
            return true;
        }
    }
    return false;
}
int main(){
    int n,m,k;
    cin >> n >> m >> k;
    friendList = vector<vector<int>>(n);
    blockList = vector<vector<int>>(n);
    preFriendNodeList = vector <Node>(n);
    for(int i = 0; i < m; i++){
        int a,b;
        cin >> a >> b;
        a--;
        b--;
        friendList[a].push_back(b);
        friendList[b].push_back(a);
        makeUnion(a,b,preFriendNodeList);
        #if 0
        for(int i = 0; i < preFriendNodeList.size(); i++){
            cout << "i:" << i << endl;
            cout << preFriendNodeList[i].rootId << endl;
            cout << preFriendNodeList[i].leafNum << endl;
            cout << endl;
        }
        #endif
    }
    for(int i = 0; i< k; i++){
        int c,d;
        cin >> c >> d;
        c--;
        d--;
        blockList[c].push_back(d);
        blockList[d].push_back(c);
    }
    #if 0
    for(int i = 0; i < preFriendNodeList.size(); i++){
        cout << "i:" << i << endl;
        cout << preFriendNodeList[i].rootId << endl;
        cout << preFriendNodeList[i].leafNum << endl;
        cout << endl;
    }
    #endif
    #if 0
    for(int i = 0; i < preFriendNodeList.size(); i++){
        cout << "i:" << i << endl;
        cout << preFriendNodeList[i].rootId << endl;
        cout << preFriendNodeList[i].totalLeafNum << endl;
        cout << endl;
    }
    #endif
    #if 0
    for(int i = 0; i < preFriendNodeList.size(); i++){
        int unionNum = getRootId(i,preFriendNodeList);
        cout << unionNum << " ";
    }
    cout << endl;
    for(int i = 0; i < preFriendNodeList.size(); i++){
        int unionNum = getUnionMemberNum(i,preFriendNodeList);
        cout << unionNum << " ";
    }
    cout << endl;
    for(int i = 0; i < preFriendNodeList.size(); i++){
        int friendNum = friendList[i].size();
        cout << friendNum << " ";
    }
    cout << endl;
    for(int i = 0; i < preFriendNodeList.size(); i++){
        int blockNum = blockList[i].size();
        cout << blockNum << " ";
    }
    cout << endl;
    #endif
    for(int i = 0; i < preFriendNodeList.size(); i++){
        int unionNum = getUnionMemberNum(i,preFriendNodeList);
        int friendNum = friendList[i].size();
        int blockNumInPreFriend = 0;
        for(int j = 0; j < blockList[i].size(); j++){
            int blockRoot = getRootId(blockList[i][j],preFriendNodeList);
            int myRoot = getRootId(i,preFriendNodeList);
            if(myRoot==blockRoot){
                blockNumInPreFriend++;
            }
        }
        int ans = unionNum-friendNum-blockNumInPreFriend-1;
        cout << ans << " ";
    }
    cout << endl;
   
    return 0;
}

Measured memory_bytes: 12664