#include <bits/stdc++.h>
using namespace std;
int a[510000], b[510000], v[510000];
int m, n;
int main() {
  cin >> m;
  for (int x = 1; x <= m; x++) {
    cin >> a[x];
  }
  b[0] = 1;
  int n = m;
  for (int x = 1; x <= m; x++) {
    v[a[x]] = 1;
    b[x] = b[x - 1] + 1;
    if (a[x] == n) {
      b[x] = b[x - 1];
      n--;
      while (v[n] && n >= 1) {
        n--;
        b[x]--;
      }
    }
  }
  for (int x = 0; x <= m; x++) {
    cout << b[x] << " ";
  }
}
