#include <iostream>
using namespace std;
void Bsort(int a[], int n)
{
for (int i = 0; i < n; ++i)
{
for (int j = 0; j < n - i - 1; ++j)
{
if (a[j]>a[j + 1])
{
int temp = a[j];
a[j] = a[j + 1];
a[j + 1] = temp;
}
}
}
}
void main()
{
int a[] = {2,6,12,1,8,7,2,3,7,5,4,5};
Bsort(a,12);
for (int i = 0; i < 12; ++i)
{
cout << a[i] << endl;
}
}