#include<bits/stdc++.h>
using namespace std;
int main(){
    int i,n,a[51],s[51],j=1;
    cin>>n;
    for(i=0;i<n;i++){
        cin>>a[i];
    }
    sort(a,a+n);
    s[n/2]=a[n-1];
    for(i=(n-1)/2-1;i>=0;i--){
        s[n-i-1]=a[n-1-j];
        j++;
        s[i]=a[n-1-j];
        j++;
    }
    for(i=0;i<n;i++){
        cout<<s[i]<<" ";
    } 
    return 0;
}
/**************************************************************
	Problem: 1283
	User: lijinkai
	Language: C++
	Result: Accepted
	Time:8 ms
	Memory:2076 kb
****************************************************************/