#include <bits/stdc++.h>
using namespace std;
int t[300002];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  cout << 1 << ' ';
  int j = n - 1;
  int a;
  int x = 0;
  for (int i = 0; i < n - 1; i++) {
    cin >> a;
    a--;
    t[a] = 1;
    x++;
    while (t[j] == 1 && j >= 0) {
      j--;
      x--;
    }
    cout << x + 1 << ' ';
  }
  cout << 1 << "\n";
}
