public class test17{
public static void main(String args[]){
Scanner in=new Scanner(System.in);
while(in.hasNext()){
int n=in.nextInt();
if(n==0) break;
int a[]=new int[n];
int k=0,t;
for(int i=0;i
}
int min=a[0];
for(int j=1;j
min=a[j];
k=j;
}
}
t=a[0];
a[0]=a[k];
a[k]=t;
for(int p=0;p
System.out.println();
}
}
}
}