// inputに入力データ全体が入る
function Main(input) {
  input = input.split("\n");
  tmp = input.shift();
  N = parseInt(tmp.split(" ")[0]);
  M = parseInt(tmp.split(" ")[1]);
  K = parseInt(tmp.split(" ")[2]);
  Fbj = {};
  Bbj = {};
  F = [];
  B = [];
  Hbj = {};
  kouho = {};
  kouho2 = {};
  kouho3 = [];
  for (i = 0; i < M; i++) {
    F.push(input[i]);
  }
  for (i = M; i < M + K; i++) {
    B.push(input[i]);
  }
  F.forEach(v => {
    v1 = parseInt(v.split(" ")[0]);
    v2 = parseInt(v.split(" ")[1]);
    Fbj["H" + v1] || (Fbj["H" + v1] = []);
    Fbj["H" + v1].push(v2);
    Fbj["H" + v2] || (Fbj["H" + v2] = []);
    Fbj["H" + v2].push(v1);
    Fbj["H" + v1] = Fbj["H" + v1].filter((x, i, self) => self.indexOf(x) === i);
    Fbj["H" + v2] = Fbj["H" + v2].filter((x, i, self) => self.indexOf(x) === i);
  });
  B.forEach(v => {
    v1 = parseInt(v.split(" ")[0]);
    v2 = parseInt(v.split(" ")[1]);
    Bbj["H" + v1] || (Bbj["H" + v1] = []);
    Bbj["H" + v1].push(v2);
    Bbj["H" + v2] || (Bbj["H" + v2] = []);
    Bbj["H" + v2].push(v1);
    Bbj["H" + v1] = Bbj["H" + v1].filter((x, i, self) => self.indexOf(x) === i);
    Bbj["H" + v2] = Bbj["H" + v2].filter((x, i, self) => self.indexOf(x) === i);
  });

  for (i = 1; i <= N; i++) {
    Hbj["H" + i] = [...Array(N).keys()].map(i => ++i).filter(v => v != i);
    Hbj["H" + i].forEach(v => {
      kouho["H" + i] || (kouho["H" + i] = []);
      if (Fbj["H" + i] && Fbj["H" + i].find(a => v == a)) return;
      if (Bbj["H" + i] && Bbj["H" + i].find(a => v == a)) return;
      kouho["H" + i].push(v);
    });
  }

  for (i = 1; i <= N; i++) {
    kouho2["H" + i] || (kouho2["H" + i] = []);
    kouho["H" + i].forEach(v => {
      if (kouho["H" + v].find(a => i == a)) {
        kouho2["H" + i].push(v);
      }
    });
  }

  for (i = 1; i <= N; i++) {
    kouho3[i - 1] || (kouho3[i - 1] = []);
    kouho2["H" + i].forEach(v => {
      if (Fbj["H" + v]) {
        // 友達候補
        Fbj["H" + v].forEach(w => {
          // 友達候補の友達
          if (Fbj["H" + w].find(x => i == x)) {
            kouho3[i - 1].push(v);
          }
        });
      }
    });
  }

  console.log(kouho3.map(v => v.length).join(" "));
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
