#include <bits/stdc++.h>
const int maxn = 300002;
int fa[maxn];
int size[maxn];
bool vis[maxn];
int getfa(int x) {
  if (fa[x] == x) return x;
  return fa[x] = getfa(fa[x]);
}
void Union(int x, int y) {
  x = getfa(x), y = getfa(y);
  size[y] += size[x];
  fa[x] = y;
  return;
}
int main() {
  int n;
  scanf("%d", &n);
  printf("1 ");
  for (int i = 1; i < n; i++) {
    int x;
    scanf("%d", &x);
    fa[x] = x, size[x] = 1;
    if (fa[x - 1]) Union(x - 1, x);
    if (fa[x + 1]) Union(x, x + 1);
    printf("%d ", i - size[getfa(n)] + 1);
  }
  printf("1");
  return 0;
}
