#include <bits/stdc++.h>
using namespace std;
int n;
bool c[300002];
int connect;
int p[300002];
int ans = 1;
int main() {
  cin >> n;
  connect = n + 1;
  for (int i = 0; i < n; ++i) cin >> p[i];
  cout << 1 << " ";
  for (int i = 0; i < n - 1; ++i) {
    c[p[i]] = true;
    if (p[i] == connect - 1) {
      connect = p[i];
      for (int j = p[i] - 1; j > 0; --j) {
        if (!c[j]) break;
        --ans;
        connect = j;
      }
    } else {
      ++ans;
    }
    cout << ans << " ";
  }
  cout << 1 << endl;
  return 0;
}
