#include <iostream>
using namespace std;

int main()
{
    int i;
    int N; cin >> N;
    int n[N];
    int A[N-1]; cin >> A;
    for ( i = 1; i < N; i++){n[i] = i;}

    j = 0;

    for ( i = 0; i < N; i++)
    {
        if (n[i] != 0)
        {
            n[i] = 1;

            while (A[j] == A[j+1])
            {
                n[i] += 1;
                j += 1;
            }
            putchar('\n');
        }
    }


    return 0;
}