#include <bits/stdc++.h>
const int inf = 0x3f3f3f3f;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long power(long long a, long long b, long long m = 1000000007) {
  long long answer = 1;
  while (b) {
    if (b & 1) answer = (answer * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return answer;
}
using namespace std;
int rt[300000 + 5], size[300000 + 5], n, cur;
bool chk[300000 + 5];
int root(int x) {
  while (rt[x] != x) {
    x = rt[x];
  }
  return x;
}
void uni(int x, int y) {
  int root_x = root(x);
  int root_y = root(y);
  if (x == y) return;
  if (size[root_x] <= size[root_y]) {
    size[root_y] += size[root_x];
    rt[root_x] = rt[root_y];
    size[root_x] = 0;
  } else {
    size[root_x] += size[root_y];
    rt[root_y] = rt[root_x];
    size[root_y] = 0;
  }
  cur = size[root(n - 1)];
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    chk[i] = 0;
    rt[i] = i;
  }
  vector<int> v;
  v.push_back(1);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x--;
    chk[x] = 1;
    size[x] = 1;
    if (x == 0 && chk[x + 1]) {
      uni(x, x + 1);
    } else if (x == n - 1 && chk[x - 1]) {
      uni(x, x - 1);
    } else {
      if (chk[x + 1]) uni(x, x + 1);
      if (chk[x - 1]) uni(x - 1, x);
    }
    cur = size[root(n - 1)];
    v.push_back(i + 2 - cur);
  }
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
