#include <iostream>
#include <vector>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>

#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;

struct UnionFind{
    vector<int> d;
    UnionFind(int n = 0):d(n,-1){};

    int find(int x){
        if(d[x] < 0) {
            return x;
        }
        else{
            return d[x] = find(d[x]);
        }
    }
    bool unite(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) return false;
        if (d[x] > d[y]) swap(x, y);

        d[x] += d[y];
        d[y] = x;
        return true;
    }
    bool same(int x, int y){
        return find(x) == find(y);
    }
    int size(int x){
        return -d[find(x)];
    }

};



int main() {
    int deg[100005];
    vector<int> to[100005];
    int N,M,K;
    scanf("%d %d %d",&N,&M,&K);

    UnionFind uf(N);
    for(int i = 0; i < M; ++i){
        int a,b;
        scanf("%d %d",&a,&b);
        --a;
        --b;
        deg[a]++;
        deg[b]++;
        uf.unite(a,b);
    }
    for(int i = 0; i < K; ++i){
        int a ,b;
        scanf("%d %d",&a,&b);
        a--;
        b--;
        to[a].push_back(b);
        to[b].push_back(a);
    }
    for(int i = 0; i < N; ++i){
        int ans = uf.size(i) -1-deg[i];
        for(int u:to[i]){
            if(uf.same(i,u)){
                --ans;
            }
        }
        printf("%d ",ans);
    }
    return 0;
}

int A(){
    int N;
    scanf("%d",&N);
    printf("%d",N/2 + N % 2);
    return 0;
}

int B(){
    int bingo[3][3];
    for(int i = 0; i < 3; ++i){
        for(int j = 0; j < 3; ++j){
            scanf("%d",&bingo[i][j]);
        }
    }
    int N;
    scanf("%d",&N);
    int S[N];
    for(int i = 0; i < N; ++i){
        scanf("%d",&S[i]);

        for(int j = 0; j < 3; ++j){
            for(int k = 0; k < 3; ++k){
                if(bingo[j][k] == S[i]){
                    bingo[j][k] = 0;
                }
            }
        }
    }

    if(bingo[0][0]==bingo[0][1]&& bingo[0][1]==bingo[0][2]){
        printf("Yes");
        return 0;
    }
    else if(bingo[1][0] == bingo[1][1] &&bingo[1][1]== bingo[1][2] ){
        printf("Yes");
        return 0;
    }
    else if(bingo[2][0] == bingo[2][1] && bingo[2][1]== bingo[2][2] ){
        printf("Yes");
        return 0;
    }
    else if(bingo[0][0] == bingo[1][0] && bingo[1][0]== bingo[2][0] ) {
        printf("Yes");
        return 0;
    }
    else if(bingo[0][1] == bingo[1][1]&&bingo[1][1] == bingo[2][1] ){
        printf("Yes");
        return 0;
    }
    else if(bingo[0][2] == bingo[1][2] && bingo[1][2]== bingo[2][2] ){
        printf("Yes");
        return 0;
    }
    else if(bingo[0][0]== bingo[1][1]&&bingo[1][1] == bingo[2][2] ) {
        printf("Yes");
        return 0;
    }
    else if(bingo[0][2] == bingo[1][1]&&bingo[1][1] == bingo[2][0] ) {
        printf("Yes");
        return 0;
    }
    else {
        printf("No");
        return 0;
    }
}

int C(){
    int N,M;
    scanf("%d %d",&N,&M);

    int s;
    int c;
    int count[M];
    int info[M];
    int worth = 0;
    for(int i = 0; i < N; ++i){
        info[i] = 0;
        count[i] = 0;
    }
    if(N >1) {
        info[0] = 1;
    }
    for(int j = 0; j < M; ++j){
        scanf("%d %d",&s,&c);
        if(info[s-1] == c && count[s-1] >=1) {
        }
        else if(s== 1 && c == 0 && N > 1){
            worth = -1;
            count[0]++;
        }
        else if(count[s-1] == 0){
            info[s-1] = c;
            count[s-1]++;
        } else{
            worth = -1;
        }

    }
    if(worth == -1){
        printf("-1");
    }
    else{
        for(int i = 0; i < N; ++i) {
            printf("%d ",info[i]);
        }
    }
}


Measured memory_bytes: 6784