n = int( raw_input( ) )
nums = [ int( val ) for val in raw_input( ).split( " " ) ]
print( " ".join( map( str, nums ) ) )

for i in range( 1, len( nums ) ):
	key = nums[i]
	j = i - 1
	while 0 <= j and key < nums[j]:
		nums[ j+1 ] = nums[j]
		j -= 1
	nums[ j+1 ] = key
	print( " ".join( map( str, nums ) ) ) n = int( raw_input( ) ) n int( raw_input( ) ) int raw_input( ) raw_input int( val ) for val in raw_input( ).split( " " ) for val in raw_input( ).split( " " ) val raw_input( ).split( " " ) ( ).split ( ) raw_input split " " for val in raw_input( ).split( " " ) int( val ) int val nums = [ int( val ) for val in raw_input( ).split( " " ) ] nums [ int( val ) for val in raw_input( ).split( " " ) ] print( " ".join( map( str, nums ) ) ) print " ".join( map( str, nums ) ) " ".join " " join map( str, nums ) map str nums for i in range( 1, len( nums ) ):
	key = nums[i]
	j = i - 1
	while 0 <= j and key < nums[j]:
		nums[ j+1 ] = nums[j]
		j -= 1
	nums[ j+1 ] = key
	print( " ".join( map( str, nums ) ) ) i range( 1, len( nums ) ) range 1 len( nums ) len nums key = nums[i] key nums[i] nums i j = i - 1 j i - 1 i 1 while 0 <= j and key < nums[j]:
		nums[ j+1 ] = nums[j]
		j -= 1
	 0 <= j and key < nums[j] 0 <= j 0 j key < nums[j] key nums[j] nums j nums[ j+1 ] = nums[j] nums[ j+1 ] nums j+1 j 1 nums[j] nums j j -= 1 j 1 nums[ j+1 ] = key nums[ j+1 ] nums j+1 j 1 key print( " ".join( map( str, nums ) ) ) print " ".join( map( str, nums ) ) " ".join " " join map( str, nums ) map str nums j = i - 1 i - 1 j j -= 1 1 j n = int( raw_input( ) ) int( raw_input( ) ) n key = nums[i] nums[i] key nums = [ int( val ) for val in raw_input( ).split( " " ) ] [ int( val ) for val in raw_input( ).split( " " ) ] nums
n = int( raw_input( ) )
nums = [ int( val ) for val in raw_input( ).split( " " ) ]
print( " ".join( map( str, nums ) ) )

for i in range( 1, len( nums ) ):
	key = nums[i]
	j = i - 1
	while 0 <= j and key < nums[j]:
		nums[ j+1 ] = nums[j]
		j -= 1
	nums[ j+1 ] = key
	print( " ".join( map( str, nums ) ) )