n=int(input())
s=input().split(' ')

print(' '.join(s))

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

print(' '.join(s))

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