#include <bits/stdc++.h>
using namespace std;
int a[300009], Ans[300009], n;
int read() {
  int x = 1;
  char ch;
  while (ch = getchar(), ch < '0' || ch > '9')
    if (ch == '-') x = -1;
  int s = ch - '0';
  while (ch = getchar(), ch >= '0' && ch <= '9') s = s * 10 + ch - '0';
  return s * x;
}
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  int Max = 0, sum = 0;
  for (int i = n; i; i--) {
    Max = max(Max, a[i]);
    sum++;
    Ans[i] = Max - sum;
  }
  for (int i = 1; i <= n; i++) printf("%d ", Ans[i] + 1);
  puts("1");
  return 0;
}
