import java.util.Scanner;

public class Main{
	static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    }
            static void print (int num[]) {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            }
}
 import java.util.Scanner; Scanner java.util public class Main{
	static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    }
            static void print (int num[]) {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            }
} Main static Scanner in = new Scanner(System.in); in new Scanner(System.in) public static void main(String[] args) {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    } main {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    } int a = in.nextInt(); a in.nextInt() in.nextInt in int[] ints = new int[a]; ints new int[a] a for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        } int i=0; int i=0; i 0 i<a i a i++ i++ i {
            ints[i] = in.nextInt();
        } {
            ints[i] = in.nextInt();
        } ints[i] = in.nextInt() ints[i] ints i in.nextInt() in.nextInt in int MyArray; MyArray for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	} int i=0; int i=0; i 0 i<a i a i++ i++ i {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	} {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	} MyArray = ints[i] MyArray ints[i] ints i int j = i - 1; j i - 1 i 1 while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            } j>=0 && ints[j]>MyArray j>=0 j 0 ints[j]>MyArray ints[j] ints j MyArray {
                ints[j+1] = ints[j];
                j--;
            } ints[j+1] = ints[j] ints[j+1] ints j+1 j 1 ints[j] ints j j-- j ints[j+1] = MyArray ints[j+1] ints j+1 j 1 MyArray print(ints) print ints String[] args args static void print (int num[]) {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            } print {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            } for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                } int i=0; int i=0; i 0 i<num.length i num.length num num.length i++ i++ i {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                } {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                } System.out.print(num[i]) System.out.print System.out System System.out num[i] num i if (i!=num.length-1) {System.out.print(" ");} i!=num.length-1 i num.length-1 num.length num num.length 1 {System.out.print(" ");} System.out.print(" ") System.out.print System.out System System.out " " System.out.println() System.out.println System.out System System.out int num[] num public class Main{
	static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    }
            static void print (int num[]) {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            }
} public class Main{
	static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    }
            static void print (int num[]) {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            }
} Main
import java.util.Scanner;

public class Main{
	static Scanner in = new Scanner(System.in);
    public static void main(String[] args) {
    	
    	int a = in.nextInt();
    	int[] ints = new int[a];
    	
    	for (int i=0; i<a; i++) {
            ints[i] = in.nextInt();
        }
    	int MyArray;
    	for (int i=0; i<a; i++) {
    		MyArray = ints[i];
            
            int j = i - 1;
            while (j>=0 && ints[j]>MyArray) {
                ints[j+1] = ints[j];
                j--;
            }
            ints[j+1] = MyArray;
            print(ints);
    	}
    }
            static void print (int num[]) {
                for (int i=0; i<num.length; i++) {
                    System.out.print(num[i]);
                    if (i!=num.length-1) {System.out.print(" ");}
                }
                System.out.println();
            
            
    	       
            }
}

