#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300000 + 10;
int p[MAXN];
int ans[MAXN];
int lowbit(int x) { return x & (-x); }
int n;
int sum[MAXN];
void add(int x) {
  for (int i = x; i <= n + 1; i += lowbit(i)) {
    sum[i]++;
  }
}
int s(int x) {
  int ans = 0;
  for (int i = x; i > 0; i -= lowbit(i)) {
    ans += sum[i];
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  ans[0] = 1;
  int last = n + 1;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    add(x);
    int l = 0, r = n + 1;
    while (r - l > 1) {
      int m = (l + r) >> 1;
      if (i - s(m - 1) == n - m + 1) {
        r = m;
      } else {
        l = m;
      }
    }
    ans[i] = i - (n + 1 - r) + 1;
  }
  for (int i = 0; i <= n; i++) {
    printf("%d%c", ans[i], i == n ? '\n' : ' ');
  }
}
