#include <iostream>
using namespace std;
const int MAX_VALUE = 1000;
int main() {
int n, v[MAX_VALUE + 1];
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> v[i];
}
int sortat = 0, aux;
while (sortat == 0) {
sortat = 1;
for (int i = 1; i < n; ++i) {
if (v[i] > v[i + 1]) {
sortat = 0;
aux = v[i];
v[i] = v[i + 1];
v[i + 1] = aux;
}
}
}
for (int i = 1; i <= n; ++i) {
cout << v[i] << ' ';
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE1BWF9WQUxVRSA9IDEwMDA7CgppbnQgbWFpbigpIHsKICAgIGludCBuLCB2W01BWF9WQUxVRSArIDFdOwogICAgY2luID4+IG47CiAgICBmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKICAgICAgICBjaW4gPj4gdltpXTsKICAgIH0KICAgIGludCBzb3J0YXQgPSAwLCBhdXg7CiAgICB3aGlsZSAoc29ydGF0ID09IDApIHsKICAgICAgICBzb3J0YXQgPSAxOwogICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDwgbjsgKytpKSB7CiAgICAgICAgICAgIGlmICh2W2ldID4gdltpICsgMV0pIHsKICAgICAgICAgICAgICAgIHNvcnRhdCA9IDA7CiAgICAgICAgICAgICAgICBhdXggPSB2W2ldOwogICAgICAgICAgICAgICAgdltpXSA9IHZbaSArIDFdOwogICAgICAgICAgICAgICAgdltpICsgMV0gPSBhdXg7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKICAgICAgICBjb3V0IDw8IHZbaV0gPDwgJyAnOwogICAgfQogICAgcmV0dXJuIDA7Cn0=