#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:336777216")
using namespace std;
const int MAXN = 300000 + 10;
int N;
int p[MAXN];
int filled[MAXN];
void Work() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) scanf("%d", &p[i]);
  printf("1");
  filled[N + 1] = 1;
  int rptr = N + 1;
  int out = 0;
  for (int i = 1; i <= N; i++) {
    filled[p[i]] = 1;
    while (filled[rptr - 1] == 1) {
      rptr--;
      out++;
    }
    printf(" %d", i - out + 1);
  }
  printf("\n");
}
int main() {
  Work();
  return 0;
}
