#include <bits/stdc++.h>
using namespace std;
int n, temp, newend;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  ;
  cin >> n;
  newend = n - 1;
  vector<int> arr(n, 0);
  cout << "1 ";
  for (int i = 0; i < n - 1; i++) {
    cin >> temp;
    arr[temp - 1] = 1;
    for (int j = newend; j >= 0; j--) {
      if (arr[j] == 0) {
        newend = j;
        break;
      }
    }
    cout << i + 2 - (n - 1 - newend) << " ";
  }
  cout << "1";
}
