#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e9 + 13;
const long long MOD = 1e9 + 7;
int N;
int P[300005];
set<int> zero;
int T[300005];
void upd(int x, int v) {
  while (x < 300005) {
    T[x] += v;
    x += (x & -x);
  }
}
int qry(int x) {
  int ret = 0;
  while (x > 0) {
    ret += T[x];
    x -= (x & -x);
  }
  return ret;
}
int main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  cout << 1 << endl;
  for (int i = 1; i <= N; i++) zero.insert(i);
  for (int i = 1; i < N; i++) {
    cin >> P[i];
    zero.erase(P[i]);
    upd(P[i], 1);
    int x = *(--zero.end());
    cout << qry(x) + 1 << endl;
  }
  cout << 1 << endl;
}
