N = input();
A = map(int,raw_input().split(" "))
for i in range(1,len(A)):
	key = A[i]
	j = i - 1;
	for k in range(0,len(A)):
		if A[N-1] == A[k]:
			print A[k]
		else:
			print A[k],
	while j >=0 and A[j] > key:
		A[j+1] = A[j]
		j -= 1
	A[j+1] = key
for j in range(0,len(A)):
		if A[N-1] == A[j] :
			print A[j]
		else:
			print A[j], N = input() N input() input A = map(int,raw_input().split(" ")) A map(int,raw_input().split(" ")) map int raw_input().split(" ") ().split () raw_input split " " for i in range(1,len(A)):
	key = A[i]
	j = i - 1;
	for k in range(0,len(A)):
		if A[N-1] == A[k]:
			print A[k]
		else:
			print A[k],
	while j >=0 and A[j] > key:
		A[j+1] = A[j]
		j -= 1
	A[j+1] = key i range(1,len(A)) range 1 len(A) len A key = A[i] key A[i] A i j = i - 1 j i - 1 i 1 for k in range(0,len(A)):
		if A[N-1] == A[k]:
			print A[k]
		else:
			print A[k],
	 k range(0,len(A)) range 0 len(A) len A if A[N-1] == A[k]:
			print A[k]
		else:
			print A[k],
	 A[N-1] == A[k] A[N-1] A N-1 N 1 A[k] A k print A[k] A k print A[k] A k while j >=0 and A[j] > key:
		A[j+1] = A[j]
		j -= 1
	 j >=0 and A[j] > key j >=0 j 0 A[j] > key A[j] A j key A[j+1] = A[j] A[j+1] A j+1 j 1 A[j] A j j -= 1 j 1 A[j+1] = key A[j+1] A j+1 j 1 key for j in range(0,len(A)):
		if A[N-1] == A[j] :
			print A[j]
		else:
			print A[j], j range(0,len(A)) range 0 len(A) len A if A[N-1] == A[j] :
			print A[j]
		else:
			print A[j], A[N-1] == A[j] A[N-1] A N-1 N 1 A[j] A j print A[j] A j print A[j] A j j = i - 1 i - 1 j j -= 1 1 j key = A[i] A[i] key N = input() input() N A = map(int,raw_input().split(" ")) map(int,raw_input().split(" ")) A
N = input();
A = map(int,raw_input().split(" "))
for i in range(1,len(A)):
	key = A[i]
	j = i - 1;
	for k in range(0,len(A)):
		if A[N-1] == A[k]:
			print A[k]
		else:
			print A[k],
	while j >=0 and A[j] > key:
		A[j+1] = A[j]
		j -= 1
	A[j+1] = key
for j in range(0,len(A)):
		if A[N-1] == A[j] :
			print A[j]
		else:
			print A[j],