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

for i in range( nums ):
    v = array[i]
    j = i - 1
    while j >= 0 and array[j] > v:
        array[j+1] = array[j]
        j -= 1
    array[j+1] = v
    print(*array) nums  = int(input()) nums int(input()) int input() input array = list(map(int, input().split())) array list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range( nums ):
    v = array[i]
    j = i - 1
    while j >= 0 and array[j] > v:
        array[j+1] = array[j]
        j -= 1
    array[j+1] = v
    print(*array) i range( nums ) range nums v = array[i] v array[i] array i j = i - 1 j i - 1 i 1 while j >= 0 and array[j] > v:
        array[j+1] = array[j]
        j -= 1
     j >= 0 and array[j] > v j >= 0 j 0 array[j] > v array[j] array j v array[j+1] = array[j] array[j+1] array j+1 j 1 array[j] array j j -= 1 j 1 array[j+1] = v array[j+1] array j+1 j 1 v print(*array) print *array array j = i - 1 i - 1 j nums  = int(input()) int(input()) nums v = array[i] array[i] v j -= 1 1 j array = list(map(int, input().split())) list(map(int, input().split())) array
nums  = int(input())
array = list(map(int, input().split()))

for i in range( nums ):
    v = array[i]
    j = i - 1
    while j >= 0 and array[j] > v:
        array[j+1] = array[j]
        j -= 1
    array[j+1] = v
    print(*array)