numbers = []
n = raw_input()
s = raw_input()
print s
numbers = s.split(" ")
for i in range(int(n)):
	numbers[i] = int(numbers[i])


for i in range(1, int(n)):
	v = numbers[i]
	j = i - 1
	while (j >= 0 and numbers[j] > v):
		numbers[j + 1] = numbers[j]
		j -= 1
	numbers[j + 1] = v
	print ' '.join([str(a) for a in numbers]) numbers = [] numbers [] n = raw_input() n raw_input() raw_input s = raw_input() s raw_input() raw_input print numbers = s.split(" ") numbers s.split(" ") s.split s split " " for i in range(int(n)):
	numbers[i] = int(numbers[i]) i range(int(n)) range int(n) int n numbers[i] = int(numbers[i]) numbers[i] numbers i int(numbers[i]) int numbers[i] numbers i for i in range(1, int(n)):
	v = numbers[i]
	j = i - 1
	while (j >= 0 and numbers[j] > v):
		numbers[j + 1] = numbers[j]
		j -= 1
	numbers[j + 1] = v
	print ' '.join([str(a) for a in numbers]) i range(1, int(n)) range 1 int(n) int n v = numbers[i] v numbers[i] numbers i j = i - 1 j i - 1 i 1 while (j >= 0 and numbers[j] > v):
		numbers[j + 1] = numbers[j]
		j -= 1
	 j >= 0 and numbers[j] > v j >= 0 j 0 numbers[j] > v numbers[j] numbers j v numbers[j + 1] = numbers[j] numbers[j + 1] numbers j + 1 j 1 numbers[j] numbers j j -= 1 j 1 numbers[j + 1] = v numbers[j + 1] numbers j + 1 j 1 v print str(a) for a in numbers for a in numbers a numbers for a in numbers str(a) str a ' '.join([str(a) for a in numbers]) ' '.join ' ' join [str(a) for a in numbers] numbers = [] [] numbers j = i - 1 i - 1 j s = raw_input() raw_input() s j -= 1 1 j n = raw_input() raw_input() n v = numbers[i] numbers[i] v numbers = s.split(" ") s.split(" ") numbers
numbers = []
n = raw_input()
s = raw_input()
print s
numbers = s.split(" ")
for i in range(int(n)):
	numbers[i] = int(numbers[i])


for i in range(1, int(n)):
	v = numbers[i]
	j = i - 1
	while (j >= 0 and numbers[j] > v):
		numbers[j + 1] = numbers[j]
		j -= 1
	numbers[j + 1] = v
	print ' '.join([str(a) for a in numbers])