#include <bits/stdc++.h>
using namespace std;
set<int> coin;
set<int>::iterator it;
int main() {
  int n, number;
  while (~scanf("%d", &n)) {
    coin.clear();
    for (int i = 1; i <= n; i++) {
      coin.insert(i);
    }
    printf("1");
    for (int i = 1; i < n; i++) {
      scanf("%d", &number);
      coin.erase(number);
      it = coin.end();
      it--;
      number = *it;
      printf(" %d", number - coin.size() + 1);
    }
    scanf("%d", &number);
    printf(" 1\n");
  }
  return 0;
}
