#include #include using namespace std; using LL = long long; //using P = pair; using Graph = vector>; const long long LINF = 1LL << 60; #define all(x) (x).begin(), (x).end() #define rep(i,n) for(int i = 0; i < (n); ++i) templatevoid chmin(T&a, T b){if(a > b) a = b;} templatevoid chmax(T&a, T b){if(a < b) a = b;} int N, A[100009], B[100009], S[100009]; int main(){ cin >> N; for(int i = 1; i <= N; ++i) cin >> A[i]; for(int i = 1; i <= N; ++i) B[1]++, B[A[i]+1]--; for(int i = 1; i <= A[1]; ++i) S[i] = S[i-1] + B[i]; for(int i = 1; i <= A[1]; ++i){ if(i>1) cout << " "; cout << S[i]; } cout << endl; }