#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *pos = new int[n];
  int *st = new int[n];
  for (int i = 0; i < n; ++i) {
    cin >> pos[i];
    st[i] = 0;
  }
  int cn = 0;
  cout << 1 << " ";
  int end = n - 1;
  for (int i = 1; i <= n; ++i) {
    st[pos[i - 1] - 1] = 1;
    cn++;
    while (st[end] == 1) {
      cn--;
      end--;
    }
    cout << cn + 1 << " ";
  }
  cout << endl;
  return 0;
}
