#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <bitset>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <string>
#include <chrono>
#include <random>
#include <cmath>
#include <cassert>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <sstream>

using namespace std;

class Solution {
public:
    vector<int> solve(int n, vector<pair<int,int>>& edges, vector<pair<int,int>>& blocks) {
        vector<vector<int>> graph(n);

        for (auto& e : edges) {
            int u = e.first, v = e.second;
            graph[u].push_back(v);
            graph[v].push_back(u);
        }
        for (auto& V : graph) {
            sort(V.begin(), V.end());
            V.resize(unique(V.begin(), V.end()) - V.begin());
        }

        vector<vector<int>> B(n);
        for (auto& e : blocks) {
            int u = e.first, v = e.second;
            {
                auto it = lower_bound(graph[u].begin(), graph[u].end(), v);
                if (it != graph[u].end() && *it == v) {

                } else {
                    B[u].push_back(v);
                }
            }
            {
                auto it = lower_bound(graph[v].begin(), graph[v].end(), u);
                if (it != graph[v].end() && *it == u) {

                } else {
                    B[v].push_back(u);
                }
            }
        }

        for (auto& V : B) {
            sort(V.begin(), V.end());
            V.resize(unique(V.begin(), V.end()) - V.begin());
        }


        vector<int> res(n, 0);

        vector<bool> visited(n, false);
        vector<int> que(n + 1);
        vector<int> indices(n + 1, -1);
        int idx = -1;
        for (int i = 0; i < n; ++i) {
            if (!visited[i]) {
                ++idx;
                int sz = 0;
                int s = i;
                que[sz++] = s;
                visited[s] = true;

                for (int j = 0; j < sz; ++j) {
                    int u = que[j];
                    indices[u] = idx;
                    for (auto v : graph[u]) {
                        if (!visited[v]) {
                            visited[v] = true;
                            que[sz++] = v;
                        }
                    }
                }

                for (int j = 0; j < sz; ++j) {
                    int u = que[j];
                    res[u] = sz - 1 - graph[u].size();

                    for (auto v : B[u]) {
                        if (indices[v] == indices[u]) {
                            res[u] -= 1;
                        }
                    }
                }
            }
        }

        return res;
    }

};

int main(int argc, char** argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n, m, k;
    cin >> n >> m >> k;
    vector<pair<int,int>> edges;
    edges.reserve(m);
    for (int i = 0; i < m; ++i) {
        int u, v;
        cin >> u >> v;
        --u, --v;
        edges.emplace_back(u, v);
    }
    vector<pair<int,int>> blocks;
    for (int i = 0; i < k; ++i) {
        int u, v;
        cin >> u >> v;
        --u, --v;
        blocks.emplace_back(u, v);
    }
    Solution sol;
    auto res = sol.solve(n, edges, blocks);
    for (int i = 0; i < n; ++i) {
        cout << res[i] << (i == n - 1 ? '\n' : ' ');
    }

    return 0;
}

Measured memory_bytes: 14068