#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int N = 3e5 + 10, M = 1e6 + 10, inf = 1e9 + 7, MOD = 1e9 + 7;
const long long INF = 1e18 + 10, mod = 1e9 + 7;
priority_queue<int> q;
vector<int> ans;
int main() {
  int n;
  scanf("%d", &n);
  int e = n;
  ans.push_back(1);
  for (int i = 1; i <= n; i++) {
    int p;
    scanf("%d", &p);
    q.push(p);
    while (!q.empty()) {
      if (q.top() == e) {
        e--;
        q.pop();
      } else
        break;
    }
    ans.push_back(q.size() + 1);
  }
  for (int i = 0; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
