#include <bits/stdc++.h>
const int md = 1e9 + 7;
const long long hs = 199;
using namespace std;
int n, x;
set<int> a;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) a.insert(i);
  cout << "1 ";
  while (--n) {
    cin >> x;
    a.erase(x);
    auto it = a.end();
    it--;
    cout << 1 + *it - n << '\n';
  }
  cout << 1 << '\n';
}
