#include <bits/stdc++.h>
using namespace std;
int a[300000 + 10];
bool b[300000 + 10];
int ans[300000 + 10];
int main() {
  memset(b, false, sizeof(b));
  int n;
  scanf("%d", &n);
  int p = n;
  ans[0] = 0;
  for (int i = 1; i <= n; ++i) {
    int t;
    scanf("%d", &t);
    b[t] = true;
    while (b[p] && p >= 1) --p;
    ans[i] = i - (n - p);
  }
  for (int i = 0; i <= n; ++i) {
    printf("%d ", ans[i] + 1);
  }
  puts("");
  return 0;
}
