#include <algorithm>
#include <bits/stdc++.h>
#include <cstdlib>
#include <cmath>
using namespace std;

int main(){
    int n;
    cin >> n;
    vector<int>V(n);
    for(int k = 0; k < n; k++){
      cin >> V.at(k);
    }

    for(int i = 0; i<n; i++){
      V.at(i) = -1
      int x = max_element(0,n)
      cout << x <<endl;
    }
}