import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv,
    std.functional, std.math, std.numeric, std.range, std.stdio, std.string,
    std.random, std.typecons, std.container;

ulong MAX = 100_100, MOD = 10007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
alias Pair = Tuple!(long, "a", long, "b");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    long n, m, k;
    scan(n, m, k);
    auto friend = new long[][](n, 0);
    auto block = new long[][](n, 0);
    foreach (_; iota(m))
    {
        long a, b;
        scan(a, b);
        a--, b--;
        friend[a] ~= b;
        friend[b] ~= a;
    }
    foreach (_; iota(k))
    {
        long c, d;
        scan(c, d);
        c--, d--;
        block[c] ~= d;
        block[d] ~= c;
    }
    auto check = new bool[](n);
    auto cntf = new long[](n);
    long iter;
    while (iter < n)
    {
        if (check[iter])
        {
            iter++;
            continue;
        }

        long cnt;
        auto tmp = new long[](0);
        auto group = new long[](n);
        auto q = DList!(long)(friend[iter]);
        // 部分木探索
        while (!q.empty())
        {
            auto p = q.front();
            q.removeFront();
            if (!check[p])
            {
                check[p] = true;
                tmp ~= p;
                group[p] = true;
                cnt++;
                q.insertBack(friend[p]);
            }
        }
        // フレンド候補に追加
        foreach (e1; tmp)
        {
            cntf[e1] += cnt;
            foreach (e2; block[e1])
            {
                if (group[e2])
                    cntf[e1]--;
            }
            cntf[e1] -= friend[e1].length;
        }
        iter++;
        // check.writeln();
    }
    foreach (e; cntf)
    {
        writef("%s ", e - 1);
    }
    writeln();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
