#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const int MAXN = 3e5 + 5;
const long long MOD = 1e9 + 7;
int p[MAXN];
int a[MAXN];
int vis[MAXN];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  a[0] = 1;
  a[n] = 1;
  int hou = n + 1;
  for (int i = 1; i < n; i++) {
    vis[p[i]] = 1;
    while (vis[hou - 1]) {
      hou--;
    }
    a[i] = i - (n - hou);
  }
  for (int i = 0; i <= n; i++) {
    printf("%d ", a[i]);
  }
  return 0;
}
