#include <iostream>

using namespace std;

int main () {
    int N;
    int niz[N];
    cin >> N;
    for (int i=0; i<N; i++) {
        int a;
        cin >> a;
        a = niz[i];
    }
    if (N==2) {
        if (niz[0] < niz[1]) {
            cout << niz << endl;
        }
        else {
            niz[0] == niz[1];
            niz[1] == niz[0];
            cout << niz << endl;
        }
    }
    else {
        for (int j=0; j<N; j++) {
            if (niz[j] < niz[0]) {
                niz[0] = niz[j];
                niz[j] = niz[0];
                cout << niz << endl;
            }
        }
    }
    return 0;
}