#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 7;
int n, a[N], p[N], f[N], s[N];
inline int get(int x) { return x == f[x] ? x : f[x] = get(f[x]); }
void merge(int a, int b) {
  int fa = get(a), fb = get(b);
  if (fa == fb) return;
  f[fa] = fb;
  s[fb] += s[fa];
}
int main() {
  scanf("%d", &n);
  for (int i = (1); i < (n + 1); ++i) scanf("%d", p + i);
  for (int i = (1); i < (n + 1); ++i) f[i] = i, s[i] = 1, a[i] = 0;
  printf("1");
  for (int i = (1); i < (n + 1); ++i) {
    int x = p[i];
    a[x] = 1;
    if (x > 0 && a[x - 1] == 1) merge(x - 1, x);
    if (x < n && a[x + 1] == 1) merge(x + 1, x);
    int y = a[n] * s[get(n)];
    int ans = i - y + 1;
    printf(" %d", ans);
  }
  return 0;
}
