#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3 * (1e5) + 10;
int a[MAXN], c[MAXN];
bool used[MAXN];
int n, m;
int add(int x);
int query(int x);
int main() {
  scanf("%d", &n);
  int ans = 1, x, pre, nxt, lst = n;
  printf("%d ", ans);
  for (int i = 1; i < n; ++i) {
    scanf("%d", &x);
    pre = query(x - 1);
    nxt = i - 1 - query(x);
    ++ans;
    used[x] = true;
    add(x);
    if (n - query(x) == i - x) --ans;
    while (used[lst]) --ans, --lst;
    printf("%d ", ans);
  }
  printf("1\n");
}
int add(int x) {
  for (; x <= n; x += x & -x) c[x] += 1;
}
int query(int x) {
  int ret = 0;
  for (; x; x -= x & -x) ret += c[x];
  return ret;
}
