import java.util.Scanner;
public class Text3 {
public static void main(String[] args) {
Scanner input=new Scanner(System.in);
System.out.println("请输入数组的长度:");
int a=input.nextInt();
int[] ar=new int[a];
for (int i = 0; i < ar.length; i++) {
System.out.println("请输入:");
int as=input.nextInt();
ar[i]=as;
}
for (int i = 1; i < ar.length; i++) {
for (int j = 0; j < ar.length-i; j++) {
if (ar[j]>ar[j+1]) {
int te=ar[j];
ar[j]=ar[j+1];
ar[j+1]=te;
}
}
}
for (int i = 0; i < ar.length; i++) {
System.out.println(ar[i]);
}
}
}