import std.stdio, std.conv, std.array, std.string, std.algorithm, std.container, std.range, core.stdc.stdlib, std.math, std.typecons;
T[][] combinations(T)(T[] s, in int m) {   if (!m) return [[]];   if (s.empty) return [];   return s[1 .. $].combinations(m - 1).map!(x => s[0] ~ x).array ~ s[1 .. $].combinations(m); }

class Person {
  int id;
  Person[] friends = [];
  Person[] blocked = [];
  bool[int] friendIdentifiers;
  bool[int] blockedIdentifiers;

  this(int id) {
    this.id = id;
  }

  void setFriend(Person f) {
    this.friends ~= f;
    this.friendIdentifiers[f.id] = true;
    f.friends ~= this;
    f.friendIdentifiers[this.id] = true;
  }

  void setBlocked(Person b) {
    this.blocked ~= b;
    this.blockedIdentifiers[b.id] = true;
    b.blocked ~= this;
    b.blockedIdentifiers[this.id] = true;
  }

  bool* isBlocked(int id) {
    return id in blockedIdentifiers;
  }

  bool* isFriend(int id) {
    return id in friendIdentifiers;
  }

  int friendCandidates() {
    bool[int] candidates;
    candidates[id] = false;

    auto next_friends = friends.map!(f => f.friends).joiner.array;
    
    while(true) {
      foreach(f; next_friends) {
        candidates[f.id] = true;
      }

      next_friends = next_friends
        .map!(f => f.friends)
        .joiner
        .filter!(f => !(f.id in candidates))
        .array;

      if (next_friends.length == 0) break;
    }

    int count;
    foreach(c; candidates.keys) {
      if (!isFriend(c) && !isBlocked(c) && c != id) count++;
    }

    return count;
  }
}

void main() {
  int N, M, K; readf("%d %d %d\n", &N, &M, &K);

  Person[int] People;
  foreach(i; 1..N+1) People[i] = new Person(i);
  foreach(i; 0..M) {
    int a, b; readf("%d %d\n", &a, &b);
    People[a].setFriend(People[b]);
  }
  foreach(i; 0..K) {
    int a, b; readf("%d %d\n", &a, &b);
    People[a].setBlocked(People[b]);
  }

  void solve() {
    auto ans = (1).iota(N+1).map!(x => People[x].friendCandidates.to!string).joiner(" ");
    ans.writeln;
    return;
  }

  solve();
}
