#include <bits/stdc++.h>
using namespace std;
int n, x;
bool vis[300010];
int a[300010];
int ans = 1;
int main() {
  scanf("%d", &n);
  x = n;
  printf("%d ", ans);
  for (int i = 1; i < n; i++) {
    scanf("%d", &a[i]);
    vis[a[i]] = 1;
    bool p = 0;
    bool v = 0;
    while (vis[x]) {
      ans--;
      x--;
    }
    ans++;
    printf("%d ", ans);
  }
  printf("%d ", 1);
}
