#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
for(int i=0;i<n-1;i++){
int min1=i;
for(int j=i+1;j<n;j++){
if(a[j] < a[min1]){
min1=j;
}
}
swap(a[i],a[min1]);
}
for(int i=0;i<n;i++){
cout<<a[i]<<" ";
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKaW50IG1haW4oKXsKCQoJaW50IG47CgljaW4+Pm47CglpbnQgYVtuXTsKCWZvcihpbnQgaT0wO2k8bjtpKyspewoJCWNpbj4+YVtpXTsKCX0KCWZvcihpbnQgaT0wO2k8bi0xO2krKyl7CgkJaW50IG1pbjE9aTsKCQlmb3IoaW50IGo9aSsxO2o8bjtqKyspewoJCQlpZihhW2pdIDwgYVttaW4xXSl7CgkJCQltaW4xPWo7CgkJCX0KCQl9Cgkgc3dhcChhW2ldLGFbbWluMV0pOwoJfQoJZm9yKGludCBpPTA7aTxuO2krKyl7CgkJY291dDw8YVtpXTw8IiAiOwoJfQoJcmV0dXJuIDA7CgkKfQ==