n = int(input())
nums = []
nums = input().split()
intNums = list(map(int,nums))

def insertationSort(nums,intNums):
    print(' '.join(nums))
    for i in range(1,len(nums)):
        v = intNums[i]
        j = i - 1
        while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
        intNums[j+1] = v
        nums = list(map(str,intNums))
        print(' '.join(nums))

insertationSort(nums,intNums) n = int(input()) n int(input()) int input() input nums = [] nums [] nums = input().split() nums input().split() ().split () input split intNums = list(map(int,nums)) intNums list(map(int,nums)) list map(int,nums) map int nums def insertationSort(nums,intNums):
    print(' '.join(nums))
    for i in range(1,len(nums)):
        v = intNums[i]
        j = i - 1
        while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
        intNums[j+1] = v
        nums = list(map(str,intNums))
        print(' '.join(nums)) insertationSort print(' '.join(nums)) print ' '.join(nums) ' '.join ' ' join nums for i in range(1,len(nums)):
        v = intNums[i]
        j = i - 1
        while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
        intNums[j+1] = v
        nums = list(map(str,intNums))
        print(' '.join(nums)) i range(1,len(nums)) range 1 len(nums) len nums v = intNums[i] v intNums[i] intNums i j = i - 1 j i - 1 i 1 while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
         j>=0 and intNums[j]>v j>=0 j 0 intNums[j]>v intNums[j] intNums j v intNums[j+1] = intNums[j] intNums[j+1] intNums j+1 j 1 intNums[j] intNums j j = j - 1 j j - 1 j 1 intNums[j+1] = v intNums[j+1] intNums j+1 j 1 v nums = list(map(str,intNums)) nums list(map(str,intNums)) list map(str,intNums) map str intNums print(' '.join(nums)) print ' '.join(nums) ' '.join ' ' join nums nums nums intNums intNums insertationSort(nums,intNums) insertationSort nums intNums nums = [] [] nums nums = input().split() input().split() nums def insertationSort(nums,intNums):
    print(' '.join(nums))
    for i in range(1,len(nums)):
        v = intNums[i]
        j = i - 1
        while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
        intNums[j+1] = v
        nums = list(map(str,intNums))
        print(' '.join(nums)) def insertationSort(nums,intNums):
    print(' '.join(nums))
    for i in range(1,len(nums)):
        v = intNums[i]
        j = i - 1
        while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
        intNums[j+1] = v
        nums = list(map(str,intNums))
        print(' '.join(nums)) insertationSort n = int(input()) int(input()) n intNums = list(map(int,nums)) list(map(int,nums)) intNums
n = int(input())
nums = []
nums = input().split()
intNums = list(map(int,nums))

def insertationSort(nums,intNums):
    print(' '.join(nums))
    for i in range(1,len(nums)):
        v = intNums[i]
        j = i - 1
        while j>=0 and intNums[j]>v:
            intNums[j+1] = intNums[j]
            j = j - 1
        intNums[j+1] = v
        nums = list(map(str,intNums))
        print(' '.join(nums))

insertationSort(nums,intNums)
