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 = 1_000_100, MOD = 1_000_000_007, 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, "begin", long, "end");
alias PQueue(T, alias less = "a<b") = BinaryHeap!(Array!T, less);

void main()
{
    long n, m, k;
    scan(n, m, k);
    auto folows = new long[][](n, 0);
    auto blocks = new long[][](n, 0);
    foreach (i; iota(m))
    {
        long a, b;
        scan(a, b);
        folows[a - 1] ~= b - 1;
        folows[b - 1] ~= a - 1;
    }
    foreach (j; iota(k))
    {
        long c, d;
        scan(c, d);
        blocks[c - 1] ~= d - 1;
        blocks[d - 1] ~= c - 1;
    }
    // 連結成分を数える
    // メモリ足りるのか怪しい
    auto seen = new bool[](n);
    auto connect = new long[](n);
    foreach (i; iota(n))
    {
        if (seen[i])
            continue;

        // 探索済みの頂点を連想配列に記憶、最後にブロックの個数を数えて引く
        bool[long] elements;
        // BFS
        {
            auto q = DList!long(i);
            while (!q.empty())
            {
                auto p = q.front();
                seen[p] = true;
                elements[p] = true;
                q.removeFront();
                foreach (e; folows[p])
                {
                    if (!seen[e])
                    {
                        q.insertBack(e);
                        seen[e] = true;
                    }
                }
            }
        }
        auto size = elements.length;
        foreach (key, value; elements)
        {
            connect[key] = size - folows[key].length - 1;
            foreach (e; blocks[key])
            {
                if (e in elements)
                    connect[key]--;
            }
        }
    }
    foreach (e; connect)
        writef("%s ", e);
    writeln();
}

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