#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  set<int> S;
  for (int i = 1; i <= n; i++) S.insert(i);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    auto it = S.find(x);
    auto b = S.end();
    b--;
    printf("%d ", *b - (n - i - 1));
    S.erase(it);
  }
  printf("1\n");
  return 0;
}
