#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios ::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> v(n + 1);
  int cur_end = n;
  int cur_sol = 1;
  cout << cur_sol << ' ';
  for (int i = 1; i < n; i++) {
    int poz;
    cin >> poz;
    v[poz] = 1;
    if (v[cur_end]) {
      cur_end--;
      while (v[cur_end]) {
        cur_end--;
        cur_sol--;
      }
    } else {
      cur_sol++;
    }
    cout << cur_sol << ' ';
  }
  cout << 1 << '\n';
}
