#include <bits/stdc++.h>
using namespace std;
const int maxn = 300000 + 500;
int a[maxn];
void init(int n) {
  for (int i = 1; i <= n; i++) a[i] = 1;
}
int main() {
  int n;
  scanf("%d", &n);
  init(n);
  int p = n;
  printf("1");
  for (int i = 1; i < n; i++) {
    int now;
    scanf("%d", &now);
    a[now] = 0;
    if (now == p) {
      while (p >= 0 && a[p] == 0) p--;
    }
    int num = n - p;
    printf(" %d", i - num + 1);
  }
  printf(" 1\n");
  return 0;
}
