// SmartCoder
#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>  // Including tree_order_statistics_node_update

using namespace __gnu_pbds;
using namespace std;

#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).end()
#define tr(c, i) for (__typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define present(c, x) ((c).find(x) != (c).end())
#define cpresent(c, x) (find(all(c), x) != (c).end())
#define minei(x) min_element(x.begin(), x.end()) - (x).begin()
#define maxei(x) max_element(x.begin(), x.end()) - (x).begin()
#define LSOne(S) (S & (-S))

#define uns(v) sort((v).begin(), (v).end()), v.erase(unique(v.begin(), v.end()), v.end())
#define acusum(x) accumulate(x.begin(), x.end(), 0)
#define acumul(x) accumulate(x.begin(), x.end(), 1, multiplies<int>());
#define bits(x) __builtin_popcount(x)
#define oo INT_MAX
#define inf 1000000000
#define MAXN 1000007
#define MOD 1000000007

const double pi = acos(-1.0);
const double eps = 1e-11;

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

int vis[MAXN];
set<int> connected;
vector<int> adj[MAXN];
vector<int> blockShip[MAXN];
void dfs(int u) {
    if (!vis[u]) {
        connected.insert(u);
        vis[u] = true;
        for (int i = 0; i < sz(adj[u]); i++) {
            int v = adj[u][i];
            dfs(v);
        }
    }
}
int main() {
    std::ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n, m, k, a, b, c, d;
    cin >> n >> m >> k;
    memset(vis, 0, sizeof(vis));

    for (int i = 0; i < m; i++) {
        cin >> a >> b;
        a--, b--;
        adj[a].pb(b);
        adj[b].pb(a);
    }
    for (int i = 0; i < k; i++) {
        cin >> c >> d;
        c--, d--;
        blockShip[c].pb(d);
        blockShip[d].pb(c);
    }
    vector<int> res(n);
    for (int i = 0; i < n; i++) {
        if (!vis[i]) {
            connected.clear();
            dfs(i);
            tr(connected, it) {
                int node = *it;
                res[node] += connected.size() - 1;
                map<pair<int, int>, bool> vis;
                for (int j = 0; j < sz(adj[node]); j++) {
                    int v = adj[node][j];
                    int x = min(node, v);
                    int y = max(node, v);
                    if (vis.count({x, y})) continue;
                    vis[{x, y}] = true;
                    if (connected.find(v) != connected.end()) {
                        res[node]--;
                    }
                }
                for (int j = 0; j < sz(blockShip[node]); j++) {
                    int v = blockShip[node][j];
                    int x = min(node, v);
                    int y = max(node, v);
                    if (vis.count({x, y})) continue;
                    vis[{x, y}] = true;
                    if (connected.find(v) != connected.end()) {
                        res[node]--;
                    }
                }
            }
        }
    }
    for (int i = 0; i < n; i++) {
        cout << res[i] << " ";
    }

    return 0;
}


Measured memory_bytes: 69368