#include <bits/stdc++.h>
using namespace std;
int p[300100], l[300100], r[300100];
int n;
void ins(int pos) {
  p[pos] = 1;
  if (pos < n && pos > 1 && p[pos + 1] == 1 && p[pos - 1] == 1) {
    r[l[pos - 1]] = r[pos + 1];
    l[r[pos + 1]] = l[pos - 1];
    l[pos] = l[pos - 1];
    r[pos] = r[pos + 1];
    return;
    if (p[pos + 1] == 1 && p[pos - 1] == 1) {
      r[l[pos - 1]] = r[pos + 1];
      l[r[pos + 1]] = l[pos - 1];
      l[pos] = l[pos - 1];
      r[pos] = r[pos + 1];
      return;
    }
    if (p[pos + 1] == 1) {
      r[pos] = r[pos + 1];
      l[r[pos]] = l[pos];
      return;
    }
    if (p[pos - 1] == 1) {
      l[pos] = l[pos - 1];
      r[l[pos]] = r[pos];
      return;
    }
    return;
  }
  if (pos < n && p[pos + 1] == 1) {
    r[pos] = r[pos + 1];
    l[r[pos]] = l[pos];
  }
  if (pos > 1 && p[pos - 1] == 1) {
    l[pos] = l[pos - 1];
    r[l[pos]] = r[pos];
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) l[i] = i, r[i] = i;
  printf("1");
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    ins(x);
    int ans;
    if (p[n] == 0)
      ans = i;
    else
      ans = i - (n - l[n] + 1);
    printf(" %d", ans + 1);
  }
  return 0;
}
