#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 10;
int c[maxn], a[maxn];
int n;
bool vis[maxn];
int lowbit(int x) { return x & (-x); }
void add(int x, int num) {
  while (x <= n) {
    c[x] += num;
    x += lowbit(x);
  }
}
int sum(int x) {
  int ans = 0;
  while (x > 0) {
    ans += c[x];
    x -= lowbit(x);
  }
  return ans;
}
int getsum(int L, int R) { return sum(R) - sum(L - 1); }
int main() {
  scanf("%d", &n);
  int cnt = n;
  printf("1");
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    vis[x] = 1;
    add(x, 1);
    while (vis[cnt] == 1) {
      add(cnt, -1);
      cnt--;
    }
    printf(" %d", sum(n) + 1);
  }
  printf("\n");
  return 0;
}
