#include #include #include #include #include #include #include #include #include #include #include #include #include //#define pb push_back //#define puts(x) cout << #x << " : " << x << endl; //#pragma GCC diagnostic ignored "-Wconversion" //#define REP(i,n) for (int i=0;i<(n);i++) //#define REPE(i,n) for (int i=0;i<=(n);i++) //#define init(a,b) memset((a), (b), (sizeof(a))); //#define PI 3.14159265 //#define EPS (1e-10) //#define EQ(a,b) (abs((a)-(b)) < EPS) using namespace std; typedef long long ll; //#define int long long int dxy[] = {0, 1, 0, -1, 0}; typedef pair P; /** * 最大公約数 * GCD */ ll gcd(ll a, ll b) { if (b == 0) return a; return gcd(b, a % b); } /** * 最小公倍数 * LCM */ ll lcm(ll a , ll b) { return a / (gcd(a, b)) * b; } int a[10005]; signed main() { int n; cin>>n; for(int i=0;i>a[i]; for(int i=0;i a[j] ) || (min_t > t) ){ min_t = t; min_index = j; } } swap(a[i + 1], a[min_index]); } for(int i=0;i0)cout<<' '; cout<