#include <bits/stdc++.h>
using namespace std;
int n, P[300010], cnt;
bool flag[300010];
int getroot(int x) {
  if (P[x] < 0) return x;
  P[x] = getroot(P[x]);
  return P[x];
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) P[i] = -1;
  P[0] = 0;
  memset(flag, true, sizeof(flag));
  cnt = 0;
  printf("1 ");
  for (int i = 1; i <= n; i++) {
    int t;
    scanf("%d", &t);
    flag[t] = false;
    ++cnt;
    if (!flag[t - 1]) {
      int u = getroot(t), v = getroot(t - 1);
      if (u != v) {
        P[v] += P[u];
        P[u] = v;
      }
    }
    if (!flag[t + 1]) {
      int u = getroot(t), v = getroot(t + 1);
      if (u != v) {
        P[v] += P[u];
        P[u] = v;
      }
    }
    int u = (!flag[n] ? getroot(n) : 0);
    printf("%d ", cnt + 1 + P[u]);
  }
  return 0;
}
