
N = int(input())
A = [int(a) for a in input().split()]

print((" ").join((str(a) for a in A)))
for i in range(1, N):
    v = A[i]
    j = i - 1
    while(j >=0 and A[j] > v):
        A[j+1] = A[j]
        j -= 1
    A[j+1] = v
    print((" ").join((str(a) for a in A))) N = int(input()) N int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A = [int(a) for a in input().split()] A [int(a) for a in input().split()] str(a) for a in A for a in A a A for a in A str(a) str a print((" ").join((str(a) for a in A))) print (" ").join((str(a) for a in A)) " ").join " " join (str(a) for a in A) for i in range(1, N):
    v = A[i]
    j = i - 1
    while(j >=0 and A[j] > v):
        A[j+1] = A[j]
        j -= 1
    A[j+1] = v
    print((" ").join((str(a) for a in A))) i range(1, N) range 1 N v = A[i] v A[i] A i j = i - 1 j i - 1 i 1 while(j >=0 and A[j] > v):
        A[j+1] = A[j]
        j -= 1
     j >=0 and A[j] > v j >=0 j 0 A[j] > v A[j] A j v 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 str(a) for a in A for a in A a A for a in A str(a) str a print((" ").join((str(a) for a in A))) print (" ").join((str(a) for a in A)) " ").join " " join (str(a) for a in A) A = [int(a) for a in input().split()] [int(a) for a in input().split()] A N = int(input()) int(input()) N j -= 1 1 j j = i - 1 i - 1 j v = A[i] A[i] v

N = int(input())
A = [int(a) for a in input().split()]

print((" ").join((str(a) for a in A)))
for i in range(1, N):
    v = A[i]
    j = i - 1
    while(j >=0 and A[j] > v):
        A[j+1] = A[j]
        j -= 1
    A[j+1] = v
    print((" ").join((str(a) for a in A)))