#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
template <typename T, typename T2>
inline void _max(T &a, T2 b) {
  a = max((T)a, (T)b);
}
template <typename T, typename T2>
inline void _min(T &a, T2 b) {
  a = min((T)a, (T)b);
}
const int MAX = 3e5 + 10;
int n, p[MAX];
vector<int> t;
int sum(int r) {
  int result = 0;
  for (; r >= 0; r = (r & (r + 1)) - 1) result += t[r];
  return result;
}
void inc(int i, int delta) {
  for (; i < n; i = (i | (i + 1))) t[i] += delta;
}
void clear() {}
void read() {}
void solve() {
  set<int> zeroPos;
  int p;
  for (int i = 0; i < n; i++) zeroPos.insert(i);
  t.assign(n, 0);
  printf("1 ");
  for (int i = 0; i < n - 1; i++) {
    scanf("%d", &p);
    p--;
    zeroPos.erase(p);
    inc(p, 1);
    int mZeroPos = *prev(zeroPos.end());
    int res = sum(mZeroPos) + 1;
    printf("%d ", res);
  }
  scanf("%d", &p);
  p--;
  zeroPos.erase(p);
  printf("1");
  printf("\n");
}
int main() {
  while (scanf("%d", &n) == 1) {
    clear();
    read();
    solve();
    return 0;
  }
  return 0;
}
