import java.util.Scanner;
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	}
} Main public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	} main {
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) ArrayList<Integer> numbers = new ArrayList<Integer>(); numbers new ArrayList<Integer>() String num_size = in.next(); num_size in.next() in.next in String input; input int size = Integer.parseInt(num_size); size Integer.parseInt(num_size) Integer.parseInt Integer num_size int i = 0; i 0 for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		} i = 0; i = 0 i 0 i < size i size i++ i++ i {
			input = in.next();
			numbers.add(Integer.parseInt(input));
		} {
			input = in.next();
			numbers.add(Integer.parseInt(input));
		} input = in.next() input in.next() in.next in numbers.add(Integer.parseInt(input)) numbers.add numbers Integer.parseInt(input) Integer.parseInt Integer input int v v j j k; k String str; str for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		} i = 0; i = 0 i 0 i < size i size i++ i++ i {
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		} {
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		} v = numbers.get(i) v numbers.get(i) numbers.get numbers i j = i - 1 j i - 1 i 1 while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			} (j >= 0) && (numbers.get(j) > v) (j >= 0) j 0 (numbers.get(j) > v) numbers.get(j) numbers.get numbers j v {
				numbers.set(j+1, numbers.get(j));
				j--;
			} numbers.set(j+1, numbers.get(j)) numbers.set numbers j+1 j 1 numbers.get(j) numbers.get numbers j j-- j numbers.set(j+1, v) numbers.set numbers j+1 j 1 v for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 } k = 0 ; k = 0 k 0 k < size k size k++ k++ k {
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 } {
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 } if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k)); k != size - 1 k size - 1 size 1 System.out.print(numbers.get(k) + " ") System.out.print System.out System System.out numbers.get(k) + " " numbers.get(k) numbers.get numbers k " " System.out.print(numbers.get(k)) System.out.print System.out System System.out numbers.get(k) numbers.get numbers k System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	}
} public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	}
} Main
import java.util.Scanner;
import java.util.*;

public class Main {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in);
		ArrayList<Integer> numbers = new ArrayList<Integer>();
	
		String num_size = in.next();
		String input;

		int size = Integer.parseInt(num_size);
		int i = 0;

		for(i = 0; i < size; i++){
			input = in.next();
			numbers.add(Integer.parseInt(input));
		}
		int v,j,k;
		String str;
		for(i = 0; i < size; i++){
			v = numbers.get(i);
			j = i - 1;
			while( (j >= 0) && (numbers.get(j) > v)){
				numbers.set(j+1, numbers.get(j));
				j--;
			}
		 numbers.set(j+1, v);
		 for(k = 0 ;k < size ;k++){
			 if(k != size - 1)
				 System.out.print(numbers.get(k) + " ");
			 else 
				 System.out.print(numbers.get(k));				 
		 }
			 System.out.print("\n");
		}
	}
}