import java.util.Scanner;

object Main extends App {

  val sc = new Scanner(System.in);

  val n = sc.nextInt();
  val m = sc.nextInt();
  val k = sc.nextInt();
  val ab = List.fill(m)((sc.nextInt(), sc.nextInt())).toSet;
  val cd = List.fill(k)((sc.nextInt(), sc.nextInt())).toSet;

  def buildCluster(p: Int): Set[Int] = {
    @scala.annotation.tailrec
    def sub(ps: Set[Int], cluster: Set[Int]): Set[Int] = {
      if (ps.isEmpty) {
        cluster;
      } else {
        val ps2 = ps.flatMap { i =>
          ab.flatMap { case (x, y) =>
            if (x == i) {
              Some(y);
            } else if (y == i) {
              Some(x);
            } else {
              None;
            }
          }.filter(p => !cluster.contains(p));
        }
        sub(ps2, cluster ++ ps2);
      }
    }
    sub(Set(p), Set(p));
  }

  val clusters: Set[Set[Int]] = {
    @scala.annotation.tailrec
    def sub(ps: Set[Int], result: Set[Set[Int]]): Set[Set[Int]] = {
      if (ps.isEmpty) {
        result;
      } else {
        val p = ps.head;
        val r = buildCluster(p);
        val result2 = result + r;
        val ps2 = ps.filter(p => !r.contains(p));
        sub(ps2, result2);
      }
    }
    sub((1 to n).toSet, Set.empty);
  }

  def isFriend(p1: Int, p2: Int): Boolean = {
    ab.exists { case (x, y) =>
      x == p1 && y == p2 || x == p2 && y == p1;
    }
  }

  def isBlock(p1: Int, p2: Int): Boolean = {
    cd.exists { case (x, y) =>
      x == p1 && y == p2 || x == p2 && y == p1;
    }
  }
  
  val answer = (1 to n).map { p =>
    val cluster = clusters.find(c => c.contains(p)).get;
    cluster.filter { p2 =>
      if (p == p2) {
        false;
      } else if (isFriend(p, p2)) {
        false;
      } else if (isBlock(p, p2)) {
        false;
      } else {
        true;
      }
    }.size;
  }

  println(answer.mkString(" "));
}
