#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0, f = 1;
  char c = getchar();
  while ((c < '0') || (c > '9')) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while ((c >= '0') && (c <= '9'))
    x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();
  return x * f;
}
const int maxn = 300005;
int n, p[maxn], fa[maxn];
bool mark[maxn];
int find_fa(int x) { return x == fa[x] ? x : fa[x] = find_fa(fa[x]); }
int main() {
  n = read();
  for (int i = 1, iend = n; i <= iend; ++i) p[i] = read();
  for (int i = 1, iend = n; i <= iend; ++i) fa[i] = i;
  printf("%d ", 1);
  for (int i = 1, iend = n; i <= iend; ++i) {
    mark[p[i]] = 1;
    if (mark[p[i] + 1]) fa[p[i] + 1] = p[i];
    if (mark[p[i] - 1]) fa[p[i]] = p[i] - 1;
    int ans = i + 1;
    if (mark[n]) ans -= n - find_fa(n) + 1;
    printf("%d%c", ans, i == n ? '\n' : ' ');
  }
  return 0;
}
