num_cnt = int(input().rstrip())

nums = list(map(int, input().rstrip().split(" ")))

for i in range(num_cnt):
    tmpNum = nums[i]
    j = i -1 
    
    while j >=0:
        if nums[j] <= tmpNum:
            break
        nums[j+1] = nums[j]
        j = j-1
    nums[j+1] = tmpNum
    print (" ".join(map(str,nums))) num_cnt = int(input().rstrip()) num_cnt int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip nums = list(map(int, input().rstrip().split(" "))) nums list(map(int, input().rstrip().split(" "))) list map(int, input().rstrip().split(" ")) map int input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " for i in range(num_cnt):
    tmpNum = nums[i]
    j = i -1 
    
    while j >=0:
        if nums[j] <= tmpNum:
            break
        nums[j+1] = nums[j]
        j = j-1
    nums[j+1] = tmpNum
    print (" ".join(map(str,nums))) i range(num_cnt) range num_cnt tmpNum = nums[i] tmpNum nums[i] nums i j = i -1 j i -1 i 1 while j >=0:
        if nums[j] <= tmpNum:
            break
        nums[j+1] = nums[j]
        j = j-1
     j >=0 j 0 if nums[j] <= tmpNum:
            break
         nums[j] <= tmpNum nums[j] nums j tmpNum break nums[j+1] = nums[j] nums[j+1] nums j+1 j 1 nums[j] nums j j = j-1 j j-1 j 1 nums[j+1] = tmpNum nums[j+1] nums j+1 j 1 tmpNum print (" ".join(map(str,nums))) print " ".join(map(str,nums)) " ".join " " join map(str,nums) map str nums nums = list(map(int, input().rstrip().split(" "))) list(map(int, input().rstrip().split(" "))) nums j = j-1 j-1 j j = i -1 i -1 j num_cnt = int(input().rstrip()) int(input().rstrip()) num_cnt tmpNum = nums[i] nums[i] tmpNum
num_cnt = int(input().rstrip())

nums = list(map(int, input().rstrip().split(" ")))

for i in range(num_cnt):
    tmpNum = nums[i]
    j = i -1 
    
    while j >=0:
        if nums[j] <= tmpNum:
            break
        nums[j+1] = nums[j]
        j = j-1
    nums[j+1] = tmpNum
    print (" ".join(map(str,nums)))