p,q,i,l,r;a[5000];main(n){
	for(scanf("%d",&n);~scanf("%d",a+i++););
	for(i=1;i<=2*n-4;++i){
		l=i<n?0:i-n+1;
		r=i-1>>1;
		for(p=l;p<=r;++p){
			q=i-p;
			if(a[p]>a[q]){
				a[p]^=a[q]^=a[p]^=a[q];
			}
		}
	}
	for(i=0;i<n;++i)printf("%d ",a[i]);
}