input()
myarr = list(map(int, input().split()))
for i in range(len(myarr)):
    for j in range(i, 0,-1):
        if myarr[j] < myarr[j-1]:
            t = myarr[j]
            myarr[j] = myarr[j-1]
            myarr[j-1] = t
        else:
            break
    print(" ".join(map(str, myarr)))
        
     input() input myarr = list(map(int, input().split())) myarr list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(len(myarr)):
    for j in range(i, 0,-1):
        if myarr[j] < myarr[j-1]:
            t = myarr[j]
            myarr[j] = myarr[j-1]
            myarr[j-1] = t
        else:
            break
    print(" ".join(map(str, myarr)))
        
     i range(len(myarr)) range len(myarr) len myarr for j in range(i, 0,-1):
        if myarr[j] < myarr[j-1]:
            t = myarr[j]
            myarr[j] = myarr[j-1]
            myarr[j-1] = t
        else:
            break
     j range(i, 0,-1) range i 0 -1 if myarr[j] < myarr[j-1]:
            t = myarr[j]
            myarr[j] = myarr[j-1]
            myarr[j-1] = t
        else:
            break
     myarr[j] < myarr[j-1] myarr[j] myarr j myarr[j-1] myarr j-1 j 1 t = myarr[j] t myarr[j] myarr j myarr[j] = myarr[j-1] myarr[j] myarr j myarr[j-1] myarr j-1 j 1 myarr[j-1] = t myarr[j-1] myarr j-1 j 1 t break print(" ".join(map(str, myarr))) print " ".join(map(str, myarr)) " ".join " " join map(str, myarr) map str myarr t = myarr[j] myarr[j] t myarr = list(map(int, input().split())) list(map(int, input().split())) myarr
input()
myarr = list(map(int, input().split()))
for i in range(len(myarr)):
    for j in range(i, 0,-1):
        if myarr[j] < myarr[j-1]:
            t = myarr[j]
            myarr[j] = myarr[j-1]
            myarr[j-1] = t
        else:
            break
    print(" ".join(map(str, myarr)))
        
    
