#include <bits/stdc++.h>
using namespace std;
void dk_98() {}
void solve() {
  int n;
  cin >> n;
  int end = n;
  int prev = 1;
  cout << prev << " ";
  vector<bool> vis(n + 1, false);
  for (int i = 0; i < (int)(n); i++) {
    int x;
    cin >> x;
    vis[x] = true;
    if (x == end) {
      end--;
      while (end >= 0 and vis[end]) {
        prev--;
        end--;
      }
      cout << prev;
    } else {
      cout << prev + 1;
      prev++;
    }
    cout << ' ';
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  dk_98();
  int t = 1;
  while (t--) {
    solve();
  }
}
