#include <iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; ++i)
{
cin >> arr[i];
}
int index;
for (int i = 0; i < n; ++i)
{
int min = arr[i];
index = i;
for (int j = i + 1; j < n; ++j)
{
if (min > arr[j])
{
min = arr[j];
index = j;
}
}
swap(arr[i], arr[index]);
}
for (int i = 0; i < n; ++i)
{
cout << arr[i] << " ";
}
return 0;
}