length = int(input())
targ = [int(n) for n in input().split(' ')]
for l in range(length):
    insert = 0
    for m in range(l):
        if targ[l] >= targ[l - m - 1]:
            insert = l - m
            break
    aftdisp = targ[l]
    for i in range(0,l - insert):
        disp = targ[l - i]
        targ[l - i] = targ[l - i - 1]
        targ[l - i - 1] = disp
    print(" ".join([str(n) for n in targ])) length = int(input()) length int(input()) int input() input int(n) for n in input().split(' ') for n in input().split(' ') n input().split(' ') ().split () input split ' ' for n in input().split(' ') int(n) int n targ = [int(n) for n in input().split(' ')] targ [int(n) for n in input().split(' ')] for l in range(length):
    insert = 0
    for m in range(l):
        if targ[l] >= targ[l - m - 1]:
            insert = l - m
            break
    aftdisp = targ[l]
    for i in range(0,l - insert):
        disp = targ[l - i]
        targ[l - i] = targ[l - i - 1]
        targ[l - i - 1] = disp
    print(" ".join([str(n) for n in targ])) l range(length) range length insert = 0 insert 0 for m in range(l):
        if targ[l] >= targ[l - m - 1]:
            insert = l - m
            break
     m range(l) range l if targ[l] >= targ[l - m - 1]:
            insert = l - m
            break
     targ[l] >= targ[l - m - 1] targ[l] targ l targ[l - m - 1] targ l - m - 1 l - m l m 1 insert = l - m insert l - m l m break aftdisp = targ[l] aftdisp targ[l] targ l for i in range(0,l - insert):
        disp = targ[l - i]
        targ[l - i] = targ[l - i - 1]
        targ[l - i - 1] = disp
     i range(0,l - insert) range 0 l - insert l insert disp = targ[l - i] disp targ[l - i] targ l - i l i targ[l - i] = targ[l - i - 1] targ[l - i] targ l - i l i targ[l - i - 1] targ l - i - 1 l - i l i 1 targ[l - i - 1] = disp targ[l - i - 1] targ l - i - 1 l - i l i 1 disp str(n) for n in targ for n in targ n targ for n in targ str(n) str n print(" ".join([str(n) for n in targ])) print " ".join([str(n) for n in targ]) " ".join " " join [str(n) for n in targ] insert = 0 0 insert disp = targ[l - i] targ[l - i] disp targ = [int(n) for n in input().split(' ')] [int(n) for n in input().split(' ')] targ length = int(input()) int(input()) length aftdisp = targ[l] targ[l] aftdisp insert = l - m l - m insert
length = int(input())
targ = [int(n) for n in input().split(' ')]
for l in range(length):
    insert = 0
    for m in range(l):
        if targ[l] >= targ[l - m - 1]:
            insert = l - m
            break
    aftdisp = targ[l]
    for i in range(0,l - insert):
        disp = targ[l - i]
        targ[l - i] = targ[l - i - 1]
        targ[l - i - 1] = disp
    print(" ".join([str(n) for n in targ]))