#include
using namespace std;
void bubble_sort(int arr[], int n, auto x, auto start)
{
if(n == 1)
return;
if(arr > x)
{
arr = start;
bubble_sort(arr, n - 1, x, start);
}
else
{
if(arr[0] > arr[1])
swap(arr[0], arr[1]);
bubble_sort(arr + 1, n, x, start);
}
}
int main()
{
int n;
cin >> n;
int arr[n];
auto x = arr + n;
auto start = arr;
for(int i=0; i<n; i++)
cin >> arr[i];
bubble_sort(arr, n, x, start);
for(int i=0; i<n; i++)
cout << arr[i] << " ";
return 0;
}