#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
vector<int> adj[N];
int deg[N], ans[N];
pair<int, int> ed[N];
queue<int> lazy;
bool rem_e[N], rem_v[N];
int k, tot;
void erase(int i) {
  if (rem_e[i]) return;
  rem_e[i] = true;
  for (int u : {ed[i].first, ed[i].second}) {
    if (deg[u] == k) {
      lazy.push(u);
    }
    deg[u]--;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m >> k;
  tot = n;
  for (int i = 0; i < m; i++) {
    int u, v;
    cin >> u >> v;
    ed[i] = {u, v};
    adj[u].push_back(i);
    deg[u]++;
    adj[v].push_back(i);
    deg[v]++;
  }
  for (int i = 1; i <= n; i++)
    if (deg[i] < k) lazy.push(i);
  for (int i = m - 1; i >= 0; i--) {
    while (!lazy.empty()) {
      int u = lazy.front();
      lazy.pop();
      if (rem_v[u]) continue;
      rem_v[u] = true;
      tot--;
      for (int i : adj[u]) erase(i);
    }
    ans[i] = tot;
    erase(i);
  }
  for (int i = 0; i < m; i++) {
    cout << ans[i] << ' ';
  }
  cout << '\n';
  return 0;
}
