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