#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main(void) {
	
	int N;
	int A[200000];
	int B[200000];
	int i, j=0, count=0;

	scanf("%d", &N);

	for (i = 0; i < N; i++) {
		scanf("%d", &A[i]);
		count++;
		if (i > 0 && A[i] > A[i - 1]) {
			B[j] = count;
			count = 1;
			j += A[i] - A[i - 1];
		}
	}

	for (j = 1; j < N; j++) {
		printf("%d\n", B[j]);
	}

	return 0;
}