#include <bits/stdc++.h>
using namespace std;
int p[300010];
int c[300010];
bool vis[300010];
int n;
int lowbit(int x) { return x & (-x); }
void add(int x, int val) {
  for (int i = x; i <= n; i += lowbit(i)) c[i] += val;
}
int query(int x) {
  int res = 0;
  for (int i = x; i > 0; i -= lowbit(i)) res += c[i];
  return res;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  printf("1");
  memset(vis, false, sizeof(vis));
  int right = n;
  for (int i = 1; i <= n; i++) {
    vis[p[i]] = true;
    add(p[i], 1);
    while (vis[right]) right--;
    int ans = query(right);
    printf(" %d", ans + 1);
  }
  puts("");
  return 0;
}
