#include <iostream>
#include <vector>
using namespace std;

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	
	unsigned int n;
	cin >> n;
	
	vector <int> a(n);
	
	for (int i = 0; i < n; i++) {
		cin >> a[i];
	}
	
	for (int i = 0; i < n; i++) {
		int max = 0;
		int max_value = a[max];
		
		for (int j = 0; j < n - i; j++) {
			// cout << a[j] << " ";
			if (a[j] > max_value) {
				max = j;
				max_value = a[j];
			}
			
			
		}
		
		swap(a[max], a[n - i - 1]);
		cout << max << " ";
 	}
	
	
	return 0;
}