#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> using namespace std; int main() { int n; cin >> n; int a[n]; for(int i=1;i<=n;i++) cin >> a[i]; int minn; for(int i=1;i<n;i++) { minn = i; for(int j=i+1;j<=n;j++) { if(a[minn]>a[j]) minn = j; } if(i!=minn) swap(a[i],a[minn]); } for(int i=1;i<=n;i++) cout << a[i] << endl; return 0; }