#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
int x;
while (cin >> x)
{
int y[1000];
for (int i = 0; i < x; i++)
{
cin >> y[i];
}
for (int i = 0; i < x; i++)
{
int idx = i;
for (int j = i; j < x; j++)
{
if (y[j] < y[idx])
{
idx = j;
}
}
swap(y[i], y[idx]);
}
for (int i = 0; i < x; i++)
{
cout << y[i] << " ";
}
cout << endl;
}
}