import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String args[]) {
		
		int n = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<>();
		for (int i=0; i<n; i++) {
			list.add(sc.nextInt());
		}
		
		for (int i=0; i<n; i++) {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		}
		
	}
} import java.util.*; util.* java class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String args[]) {
		
		int n = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<>();
		for (int i=0; i<n; i++) {
			list.add(sc.nextInt());
		}
		
		for (int i=0; i<n; i++) {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		}
		
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String args[]) {
		
		int n = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<>();
		for (int i=0; i<n; i++) {
			list.add(sc.nextInt());
		}
		
		for (int i=0; i<n; i++) {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		}
		
	} main {
		
		int n = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<>();
		for (int i=0; i<n; i++) {
			list.add(sc.nextInt());
		}
		
		for (int i=0; i<n; i++) {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		}
		
	} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() for (int i=0; i<n; i++) {
			list.add(sc.nextInt());
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			list.add(sc.nextInt());
		} {
			list.add(sc.nextInt());
		} list.add(sc.nextInt()) list.add list sc.nextInt() sc.nextInt sc for (int i=0; i<n; i++) {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		} {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		} for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			} int j=0; int j=0; j 0 j<=i j i j++ j++ j {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			} {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			} if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				} list.get(i) <= list.get(j) list.get(i) list.get list i list.get(j) list.get list j {
					Collections.swap(list, i, j);
				} Collections.swap(list, i, j) Collections.swap Collections list i j for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			} int j=0; int j=0; j 0 j<n j n j++ j++ j {
				System.out.print((j==0?"":" ")+list.get(j));
			} {
				System.out.print((j==0?"":" ")+list.get(j));
			} System.out.print((j==0?"":" ")+list.get(j)) System.out.print System.out System System.out (j==0?"":" ")+list.get(j) (j==0?"":" ") j==0 j 0 "" " " list.get(j) list.get list j System.out.println() System.out.println System.out System System.out String args[] args
import java.util.*;

class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String args[]) {
		
		int n = sc.nextInt();
		ArrayList<Integer> list = new ArrayList<>();
		for (int i=0; i<n; i++) {
			list.add(sc.nextInt());
		}
		
		for (int i=0; i<n; i++) {

			for (int j=0; j<=i; j++) {
				if (list.get(i) <= list.get(j)) {
					Collections.swap(list, i, j);
				}
			}

			for (int j=0; j<n; j++) {
				System.out.print((j==0?"":" ")+list.get(j));
			}
			System.out.println();
			
		}
		
	}
}
