package C4;
import java.util.Scanner;
public class SelectSortTest {
public static void main(String[] args)
{
SelectSortTest test = new SelectSortTest();
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] data = new int[100];
for(int i=0;i<n;i++)
{
data[i] = sc.nextInt();
}
test.selectSort(data, n);
test.print(data, n);
}
public void selectSort(int data[],int n)
{
for(int i=0;i<n-1;i++)
{
int k =i;
for(int j=i+1;j<n;j++)
{
if(data[j]<data[k])
{
k=j;
}
}
if(k != i)
{
int tmp = data[k];
data[k]=data[i];
data[i]=tmp;
}
}
}
public void print(int[] data,int n)
{
for(int i=0;i<n;i++)
System.out.print(data[i]+"\t");
System.out.println();
}
}