// dfmt off
T lread(T=long)(){return readln.chomp.to!T;}T[] lreads(T=long)(long n){return iota(n).map!((_)=>lread!T).array;}
T[] aryread(T=long)(){return readln.split.to!(T[]);}void arywrite(T)(T a){a.map!text.join(' ').writeln;}
void scan(L...)(ref L A){auto l=readln.split;foreach(i,T;L){A[i]=l[i].to!T;}}alias sread=()=>readln.chomp();
void dprint(L...)(lazy L A){debug{auto l=new string[](L.length);static foreach(i,a;A)l[i]=a.text;arywrite(l);}}
static immutable MOD=10^^9+7;alias PQueue(T,alias l="b<a")=BinaryHeap!(Array!T,l);import std;
// dfmt on

void main()
{
    long N, M, K;
    scan(N, M, K);
    auto A = new long[](M);
    auto B = new long[](M);
    auto C = new long[](K);
    auto D = new long[](K);
    foreach (i; 0 .. M)
        scan(A[i], B[i]);
    foreach (i; 0 .. K)
        scan(C[i], D[i]);
    A[] -= 1;
    B[] -= 1;
    C[] -= 1;
    D[] -= 1;
    auto uf = UnionFind(N);
    foreach (i; 0 .. M)
    {
        uf.unite(A[i], B[i]);
    }
    auto ans = new long[](N);
    foreach (i; 0 .. N)
    {
        ans[i] = uf.size(i);
    }
    foreach (i; 0 .. M)
    {
        ans[A[i]]--;
        ans[B[i]]--;
    }
    foreach (i; 0 .. K)
    {
        if (uf.find(C[i]) == uf.find(D[i]))
        {
            ans[C[i]]--;
            ans[D[i]]--;
        }
    }
    ans[] -= 1;
    arywrite(ans);
}

struct UnionFind
{
    alias T = long;
    T[] rank, parent, sizes;
    this(T n)
    {
        rank = new T[](n);
        sizes = new T[](n);
        sizes[] = 1;
        parent = iota!T(n).array();
    }

    T find(T x)
    {
        return (this.parent[x] == x) ? x : (this.parent[x] = this.find(this.parent[x]));
    }

    void unite(T x, T y)
    {
        T rx = this.find(x), ry = this.find(y);
        if (rx == ry)
            return;
        this.sizes[rx] = this.sizes[ry] = this.sizes[rx] + this.sizes[ry];
        if (this.rank[rx] == this.rank[ry])
            this.parent[rx] = ry, this.rank[ry]++;
        else if (this.rank[rx] < this.rank[ry])
            this.parent[rx] = ry;
        else
            this.parent[ry] = rx;
    }

    T size(T x)
    {
        return this.sizes[this.find(x)];
    }
}
