#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int in = n;
  cout << "1 ";
  int cnt = 0;
  vector<int> st(n + 1);
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    if (st[a] == 0) {
      st[a] = 1;
      cnt++;
    } else {
      cout << st[a] << " ";
      continue;
    }
    if (in == a) {
      int a = 0;
      while (in != 0 && st[in] != 0) {
        in--;
        a++;
        assert(a <= n);
      }
    }
    if (in == 0) {
      cout << 1 << " ";
    } else {
      st[a] = 1 + cnt - (n - in);
      cout << st[a] << " ";
    }
  }
}
