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 Group {
  bool[int] identifierSet;

  this(Person person) {
    identifierSet[person.id] = true;
  }

  void add(Group group) {
    group.identifierSet.keys.each!(id => identifierSet[id] = true);
  }

  int[] identifiers() {
    return identifierSet.keys;
  }
}

class Person {
  static Person[int] People;
  static Person byId(int id) { return People[id]; }

  int id;
  Group group;
  bool[int] friendIdentifiers;
  bool[int] blockedIdentifiers;

  this(int id) {
    this.id = id;
    People[id] = this;
    group = new Group(this);
  }

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

    group.add(f.group);
    f.group.identifierSet.keys.each!(x => Person.byId(x).group = group);
  }

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

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

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

  int friendCandidates() {
    int count;
    foreach(c; group.identifiers) {
      if (c != id && !isFriend(c) && !isBlocked(c)) {
        count++;
      }
    }

    return count;
  }
}

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

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

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