#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int M = 1e5 + 5;
unsigned long long pw[67];
void pre() {
  pw[0] = 1;
  for (int i = 1; i < 64; i++) pw[i] = 2 * pw[i - 1];
}
int bit[300005];
void update(int x) {
  for (int i = x; i < 300005; i += i & -i) {
    bit[i]++;
  }
}
int quer(int x) {
  int s = 0;
  for (int i = x; i > 0; i -= i & -i) {
    s += bit[i];
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  pre();
  int n, i, p[300005];
  for (i = 0; i < 300005; i++) bit[i] = 0;
  cin >> n;
  bool ans = false;
  for (i = 1; i <= n; i++) {
    cin >> p[i];
    if (i == 1) cout << "1 ";
    update(n + 1 - p[i]);
    int low = 1, high = n, mid;
    if (p[i] == n) {
      ans = true;
    }
    if (!ans) {
      cout << i + 1 << " ";
    } else {
      while (low < high) {
        mid = (low + high) / 2;
        if (quer(mid) == mid)
          low = 1 + mid;
        else
          high = mid;
      }
      low--;
      if (i == n)
        cout << "1\n";
      else
        cout << i - low + 1 << " ";
    }
  }
  return 0;
}
