#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; ++i) {
    cin >> A[i];
    A[i]--;
  }
  vector<int> ans;
  ans.push_back(1);
  vector<bool> C(n, false);
  int pointer = n - 1;
  for (int i = 0; i < n - 1; ++i) {
    C[A[i]] = true;
    while (C[pointer] && pointer > 0) pointer--;
    int num = i + 1 - (n - 1 - pointer);
    ans.push_back(num + 1);
  }
  ans.push_back(1);
  for (int lpl = 0; lpl < ans.size(); lpl++) {
    cout << ans[lpl] << " ";
  }
  cout << endl;
  ;
  return 0;
}
