import java.util.Scanner;
class Main{
    public static void main(String[] args){
	int key,i,j,k,l;
	int array[] = new int[101];

	Scanner scan = new Scanner(System.in);
	array[0] = scan.nextInt();
	for(l=1;l<=array[0];l++){
	    array[l] = scan.nextInt();
	}
	
	
	for(i=1;i<=array[0];i++){
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	}
    }
}
 import java.util.Scanner; Scanner java.util class Main{
    public static void main(String[] args){
	int key,i,j,k,l;
	int array[] = new int[101];

	Scanner scan = new Scanner(System.in);
	array[0] = scan.nextInt();
	for(l=1;l<=array[0];l++){
	    array[l] = scan.nextInt();
	}
	
	
	for(i=1;i<=array[0];i++){
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	}
    }
} Main public static void main(String[] args){
	int key,i,j,k,l;
	int array[] = new int[101];

	Scanner scan = new Scanner(System.in);
	array[0] = scan.nextInt();
	for(l=1;l<=array[0];l++){
	    array[l] = scan.nextInt();
	}
	
	
	for(i=1;i<=array[0];i++){
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	}
    } main {
	int key,i,j,k,l;
	int array[] = new int[101];

	Scanner scan = new Scanner(System.in);
	array[0] = scan.nextInt();
	for(l=1;l<=array[0];l++){
	    array[l] = scan.nextInt();
	}
	
	
	for(i=1;i<=array[0];i++){
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	}
    } int key key i i j j k k l; l int array[] = new int[101]; array new int[101] 101 Scanner scan = new Scanner(System.in); scan new Scanner(System.in) array[0] = scan.nextInt() array[0] array 0 scan.nextInt() scan.nextInt scan for(l=1;l<=array[0];l++){
	    array[l] = scan.nextInt();
	} l=1; l=1 l 1 l<=array[0] l array[0] array 0 l++ l++ l {
	    array[l] = scan.nextInt();
	} {
	    array[l] = scan.nextInt();
	} array[l] = scan.nextInt() array[l] array l scan.nextInt() scan.nextInt scan for(i=1;i<=array[0];i++){
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	} i=1; i=1 i 1 i<=array[0] i array[0] array 0 i++ i++ i {
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	} {
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	} key = array[i] key array[i] array i j = i-1 j i-1 i 1 while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    } j>0 && array[j]>key j>0 j 0 array[j]>key array[j] array j key {
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    } array[j+1] = array[j] array[j+1] array j+1 j 1 array[j] array j j-- j array[j+1] = key array[j+1] array j+1 j 1 key for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    } k=1; k=1 k 1 k<=array[0] k array[0] array 0 k++ k++ k {
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    } {
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    } if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		} k==array[0] k array[0] array 0 {System.out.print(array[k]+"\n");
		    break;
		} System.out.print(array[k]+"\n") System.out.print System.out System System.out array[k]+"\n" array[k] array k "\n" break; System.out.print(array[k]+" ") System.out.print System.out System System.out array[k]+" " array[k] array k " " String[] args args
import java.util.Scanner;
class Main{
    public static void main(String[] args){
	int key,i,j,k,l;
	int array[] = new int[101];

	Scanner scan = new Scanner(System.in);
	array[0] = scan.nextInt();
	for(l=1;l<=array[0];l++){
	    array[l] = scan.nextInt();
	}
	
	
	for(i=1;i<=array[0];i++){
	    key = array[i];
	    j = i-1;
	    while(j>0 && array[j]>key){
		array[j+1] = array[j];
		j--;
		array[j+1] = key;
	    }
	    for(k=1;k<=array[0];k++){
		if(k==array[0]){System.out.print(array[k]+"\n");
		    break;
		}
		System.out.print(array[k]+" ");
	    }
	}
    }
}

