#include <bits/stdc++.h>
using namespace std;
const int maxn = 300010;
int a[maxn];
int s[maxn];
int visws[maxn];
int n, m;
int pos;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &s[i]);
  }
  pos = 1e9;
  int sum = 0, top = n;
  cout << 1 << " ";
  top = 0;
  for (int i = 1; i <= n - 1; i++) {
    a[s[i]] = 1;
    if (a[n - top] == 1) {
      while (a[n - top] == 1) top++;
    }
    printf("%d ", 1 + i - top);
  }
  cout << 1;
  return 0;
}
