#include int main() { using namespace std; unsigned long N, A1; cin >> N >> A1; vector cnt(A1 + 1); cnt[0] = N; for(unsigned long i{1}, A; i < N; ++i){ cin >> A; --cnt[A]; } inclusive_scan(begin(cnt), end(cnt), begin(cnt)); cnt.pop_back(); for(const auto c : cnt)cout << c << " "; cout << endl; return 0; }