num = int(input())
sort_list = list(map(int,input().split()))
print(*sort_list)
v = 0
for i in range(1,num):
	v = sort_list[i]
	j = i - 1
	while j >= 0 and sort_list[j] > v:
		sort_list[j+1] = sort_list[j]
		j -= 1
		sort_list[j+1] = v
	print(*sort_list) num = int(input()) num int(input()) int input() input sort_list = list(map(int,input().split())) sort_list list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split print(*sort_list) print *sort_list sort_list v = 0 v 0 for i in range(1,num):
	v = sort_list[i]
	j = i - 1
	while j >= 0 and sort_list[j] > v:
		sort_list[j+1] = sort_list[j]
		j -= 1
		sort_list[j+1] = v
	print(*sort_list) i range(1,num) range 1 num v = sort_list[i] v sort_list[i] sort_list i j = i - 1 j i - 1 i 1 while j >= 0 and sort_list[j] > v:
		sort_list[j+1] = sort_list[j]
		j -= 1
		sort_list[j+1] = v
	 j >= 0 and sort_list[j] > v j >= 0 j 0 sort_list[j] > v sort_list[j] sort_list j v sort_list[j+1] = sort_list[j] sort_list[j+1] sort_list j+1 j 1 sort_list[j] sort_list j j -= 1 j 1 sort_list[j+1] = v sort_list[j+1] sort_list j+1 j 1 v print(*sort_list) print *sort_list sort_list sort_list = list(map(int,input().split())) list(map(int,input().split())) sort_list j = i - 1 i - 1 j num = int(input()) int(input()) num v = 0 0 v j -= 1 1 j v = sort_list[i] sort_list[i] v
num = int(input())
sort_list = list(map(int,input().split()))
print(*sort_list)
v = 0
for i in range(1,num):
	v = sort_list[i]
	j = i - 1
	while j >= 0 and sort_list[j] > v:
		sort_list[j+1] = sort_list[j]
		j -= 1
		sort_list[j+1] = v
	print(*sort_list)