#include <bits/stdc++.h>
using namespace std;
struct node {
  int sz = 0;
  int par = -1;
};
node nd[300005];
int n;
void join(int nd1, int nd2) {
  if (nd1 > nd2) swap(nd1, nd2);
  while (nd[nd2].par != nd2 && nd2 != n) {
    nd2 = nd[nd2].par;
  }
  nd[nd1].par = nd2;
  nd[nd2].sz += nd[nd1].sz;
  return;
}
int main() {
  cin >> n;
  cout << 1 << " ";
  for (int i = 1; i <= n; i++) {
    int k;
    cin >> k;
    nd[k].par = k;
    nd[k].sz = 1;
    if (k + 1 <= n && nd[k + 1].par != -1) {
      join(k, k + 1);
    }
    if (k - 1 >= 1 && nd[k - 1].par != -1) {
      join(k, k - 1);
    }
    cout << 1 + i - nd[n].sz << " ";
  }
  return 0;
}
