code:
#include <bits/stdc++.h>
using namespace std;
priority_queue<int,vector<int>,greater<int> >q;
int n, x;
int main() {
while (cin>> n) {
if (n== 0) return 0;
for (int i= 1; i<= n; i++) {
cin>> x;
q.push(x);
}
for (int i= 1; i<= n; i++) {
cout<< q.top() << ' ';
q.pop();
}
cout<< endl;
}
return 0;
}