import java.io.*; import java.util.*; class Main { static int gcd(int x,int y){ while(y!=0){ int r=x%y; x=y; y=r; } return x; } public static void main(String[] args) { MyScanner sc = new MyScanner(); out = new PrintWriter(new BufferedOutputStream(System.out)); int n=sc.nextInt(); int[]a=sc.nextIntArray(n); for(int i=0;iv){ min=v; minind=j; } } if(minind!=i+1){ int t=a[i+1]; a[i+1]=a[minind]; a[minind]=t; } } for(int i=0;i