#include using namespace std; #define INF 2000000000 #define MOD 1000000007 typedef long long ll; typedef pair P; int main() { int n; cin >> n; int a[n+1]; for (int i = 1; i <= n; i++) { cin >> a[i]; } for (int i = 1; i <= n-1; i++) { for (int j = i+1; j <= n; j++) { if (a[i]+a[j]<(2*n-3)) { if(a[i]>a[j]) { int tmp=a[j]; a[j]=a[i]; a[i]=tmp; } } } } for (int i = 1; i < n; i++) { cout << a[i] << " "; } cout << a[n] << endl; }