#include <bits/stdc++.h>
using namespace std;
const int N = 500050;
inline int gi() {
  register char ch = getchar();
  register int x = 0, q = 0;
  while (ch < '0' || ch > '9') ch == '-' ? q = 1 : 0, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return q ? (-x) : x;
}
int f[N], a[N], b[N], n, num;
inline void ins(int x, int s) {
  while (x <= n) f[x] += s, x += x & (-x);
  return;
}
inline int query(int x) {
  int s = 0;
  while (x) s += f[x], x -= x & (-x);
  return s;
}
int main() {
  n = gi();
  for (int i = 1; i <= n; ++i) a[i] = gi();
  printf("1");
  for (int i = 1; i <= n; ++i) ins(n - i + 1, 1);
  for (int i = 1; i <= n; ++i) {
    ins(n - a[i] + 1, -1);
    b[a[i]] = 1;
    if (query(n - a[i] + 1) > 0)
      ++num;
    else {
      for (int j = a[i] - 1; j; --j)
        if (b[j] && query(n - j + 1) == 0)
          --num;
        else
          break;
    }
    printf(" %d", num + 1);
  }
  return 0;
}
