#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  int lastzero = n - 1;
  int count = 1;
  vector<int> out;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    v[c - 1] = 1;
    if (c - 1 == lastzero) {
      while (v[lastzero] == 1) {
        count--;
        lastzero--;
      }
      count++;
    } else {
      count++;
    }
    if (i == 0) {
      out.push_back(1);
    }
    out.push_back(count);
  }
  for (int i = 0; i <= n; i++) {
    cout << out[i] << " ";
  }
  return 0;
}
