#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:667177216")
using namespace std;
const long long MOD = 1000000000 + 7;
const long long MAXN = 100000 + 100;
int sum(int n) {
  int ans = 0;
  while (n > 0) {
    ans += n % 10;
    n /= 10;
  }
  return ans;
}
const int maxik = 300000 + 10;
int FW[maxik];
int range_sum(int f, int t) {
  int ans = 0;
  for (int i = t; i >= 0; i -= (i + 1) & -(i + 1)) {
    ans += FW[i];
  }
  for (int i = f - 1; i >= 0; i -= (i + 1) & -(i + 1)) {
    ans -= FW[i];
  }
  return ans;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<int> p(n);
  for (int(i) = 0; (i) < n; (i)++) scanf("%d", &p[i]);
  memset(FW, 0, sizeof(FW));
  for (int j = n; j < maxik; j += (j + 1) & -(j + 1)) {
    FW[j]++;
  }
  printf("1 ");
  for (int(i) = 0; (i) < n; (i)++) {
    int cur = p[i] - 1;
    for (int j = cur; j < maxik; j += (j + 1) & -(j + 1)) {
      FW[j]++;
    }
    int l = 0, r = n;
    while (l < r) {
      int tm = (l + r) >> 1;
      int summa = range_sum(tm, n);
      if (summa == ((n) - (tm) + 1)) {
        r = tm;
      } else {
        l = tm + 1;
      }
    }
    printf("%d ", 1 + (i + 1) - (n - r));
  }
  return 0;
}
