#include <bits/stdc++.h>
using namespace std;
int n;
int p[300005], c[300005], vis[300005];
int lowbit(int x) { return x & (-x); }
int update(int i) {
  while (i <= n) {
    c[i] += 1;
    i += lowbit(i);
  }
}
int query(int i) {
  int ret = 0;
  while (i > 0) {
    ret += c[i];
    i -= lowbit(i);
  }
  return ret;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  printf("1 ");
  int pp = n;
  memset(vis, 0, sizeof(vis));
  memset(c, 0, sizeof(c));
  for (int i = 1; i <= n - 1; i++) {
    vis[p[i]] = 1;
    update(p[i]);
    while (vis[pp] == 1 && pp > 0) pp--;
    int x = query(pp);
    printf("%d ", x + 1);
  }
  printf("1\n");
  return 0;
}
