#include <bits/stdc++.h>
using namespace std;
vector<int> sieve(int n) {
  vector<bool> prime(n + 1, true);
  prime[0] = false;
  prime[1] = false;
  int m = sqrt(n);
  vector<int> ans;
  for (int p = 2; p <= m; p++) {
    if (prime[p]) {
      for (int i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
  for (int i = 0; i < n; i++)
    if (prime[i]) ans.push_back(i);
  return ans;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int mod = 1e9 + 7;
int power(int a, long long b) {
  int res = 1;
  while (b) {
    if (b & 1) res = 1LL * res * a;
    a = 1LL * a * a;
    b >>= 1;
  }
  return res;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long min(int a, long long b) {
  if (a > b) return b;
  return a;
}
long long max(int a, long long b) {
  if (a > b) return a;
  return b;
}
long long myXOR(long long x, long long y) { return (x | y) & (~x | ~y); }
int conti(int x) {
  if (x < 1) return 0;
  if (x % 4 == 0) return x;
  if (x % 4 == 1) return 1;
  if (x % 4 == 2) return x + 1;
  if (x % 4 == 3) return 0;
}
bool ispfsq(long double x) {
  long double sr = sqrt(x);
  return ((sr - floor(sr)) == 0);
}
vector<int> v[100010];
void solve() {
  int n;
  cin >> n;
  int a[n + 10], arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  cout << 1 << " ";
  if (n == 1) {
    cout << 1;
    return;
  }
  int ans = 0, p = n;
  for (int i = 0; i <= n; i++) a[i] = 0;
  a[n + 1] = 1;
  int c = 0;
  for (int i = 0; i < n; i++) {
    a[arr[i]] = 1;
    ans++;
    if (arr[i] == p) {
      while (a[p] == 1) {
        p--;
        c++;
      }
    }
    ans = max(0, ans);
    cout << ans - c + 1 << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int mul = 0;
  if (mul == 1) {
    int t;
    cin >> t;
    while (t--) {
      solve();
      cout << "\n";
    }
  } else {
    solve();
  }
}
