#include <bits/stdc++.h>
using namespace std;
int prv[400000], nxt[400000], n, x;
vector<int> ans;
int main() {
  cin >> n;
  int last = n;
  int cnt = 0;
  for (int i = 2; i < n; i++) {
    prv[i] = i - 1;
    nxt[i] = i + 1;
  }
  prv[last] = n - 1;
  nxt[last] = last;
  prv[1] = 1;
  nxt[1] = 2;
  ans.push_back(1);
  for (int i = 0; i < n - 1; i++) {
    cin >> x;
    prv[nxt[x]] = prv[x];
    nxt[prv[x]] = nxt[x];
    if (x == last) {
      last = prv[x];
      cnt -= x - prv[x] - 1;
    } else
      cnt++;
    ans.push_back(cnt + 1);
  }
  ans.push_back(1);
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
