#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<vector<int> > adj(26);
string s[200005];
bool visited[26];
long long int dfs(int index) {
  visited[index] = true;
  for (int i = 0; i < adj[index].size(); ++i) {
    for (int j = 0; j < s[adj[index][i]].size(); ++j) {
      if (!visited[s[adj[index][i]][j] - 'a']) dfs(s[adj[index][i]][j] - 'a');
    }
  }
}
int main() {
  int n;
  cin >> n;
  set<int> ss;
  for (int i = 0; i < n; ++i) ss.insert(i + 1);
  int arr[n];
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  cout << 1 << " ";
  for (int i = 0; i < n; ++i) {
    ss.erase(arr[i]);
    if (ss.empty()) {
      cout << 1;
      exit(0);
    }
    cout << ((*(--ss.end())) - ss.size() + 1) << " ";
  }
}
