#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const double PI = acos(-1.0);
struct BIT {
  int N;
  vector<int> bit;
  void init(int n) {
    N = n;
    bit.assign(n + 1, 0);
  }
  void update(int idx, int val) {
    while (idx <= N) {
      bit[idx] += val;
      idx += idx & -idx;
    }
  }
  void updateMax(int idx, int val) {
    while (idx <= N) {
      bit[idx] = max(bit[idx], val);
      idx += idx & -idx;
    }
  }
  int pref(int idx) {
    int ans = 0;
    while (idx > 0) {
      ans += bit[idx];
      idx -= idx & -idx;
    }
    return ans;
  }
  int rsum(int l, int r) { return pref(r) - pref(l - 1); }
  int prefMax(int idx) {
    int ans = -2e9;
    while (idx > 0) {
      ans = max(ans, bit[idx]);
      idx -= idx & -idx;
    }
    return ans;
  }
};
int n;
BIT tree;
bool can(int len) {
  if (tree.rsum(n - len + 1, n) == len) {
    return true;
  }
  return false;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  tree.init(n + 5);
  cout << 1 << " ";
  for (int i = 0; i < n; i++) {
    tree.update(ar[i], 1);
    int start = 1, end = n;
    if (tree.rsum(n, n) != 1) {
      cout << i + 2 << " ";
      continue;
    }
    while (start <= end) {
      if (start == end || start == end - 1) {
        if (can(end)) {
          cout << i + 2 - end << " ";
        } else {
          cout << i + 2 - start << " ";
        }
        break;
      }
      int mid = (start + end) / 2;
      if (can(mid)) {
        start = mid;
      } else {
        end = mid;
      }
    }
  }
}
