#include <bits/stdc++.h>
using namespace std;
int n, a[300005], b[300005], ans = 1, ex;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cout << "1 ";
  ex = n;
  for (int i = 0; i < n; i++) {
    b[a[i]] = 1;
    if (a[i] == ex) {
      while (b[ex]) ex--, ans--;
      ans++;
      cout << ans << " ";
    } else {
      ans++;
      cout << ans << " ";
    }
  }
  return 0;
}
