#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300033;
int p[MAXN], n;
int X[MAXN];
int lst[MAXN], cnt;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &p[i]);
  printf("1 ");
  for (int i = 1; i <= n; ++i) {
    X[p[i]] = 1;
    if (p[i] == n || lst[p[i] + 1]) {
      lst[p[i]] = 1;
      ++cnt;
      int now = p[i];
      while (now > 0 && X[now - 1]) {
        lst[now - 1] = 1;
        ++cnt;
        --now;
      }
    }
    if (cnt == n) {
      printf("1");
    } else
      printf("%d ", i - cnt + 1);
  }
  return 0;
}
