#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > pii;
int main() {
  int cnt[300005], n;
  memset(cnt, 0, sizeof(cnt));
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    pii.emplace_back(make_pair(x, i));
  }
  sort(pii.begin(), pii.end());
  int MAX = 0;
  for (int i = n - 1; i > -1; i--) {
    MAX = max(MAX, pii[i].second);
    cnt[MAX]++;
  }
  for (int i = 1; i <= n; i++) cnt[i] += cnt[i - 1];
  printf("1 ");
  for (int i = 1; i <= n; i++) printf("%d ", (i - cnt[i]) + 1);
  return 0;
}
