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

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

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