# coding: utf-8
n = int(input())
num = list(map(int, input().split()))
for i in range(n):
    tmp = num[i]
    j = i 
    while j>0 and num[j-1] > tmp:
        num[j] = num[j-1]
        j -= 1
    num[j] = tmp
    for i in range(n):
        if i==n-1:
            print(num[i], end='')
            break
        print(num[i], end=' ')
    print() n = int(input()) n int(input()) int input() input num = list(map(int, input().split())) num list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(n):
    tmp = num[i]
    j = i 
    while j>0 and num[j-1] > tmp:
        num[j] = num[j-1]
        j -= 1
    num[j] = tmp
    for i in range(n):
        if i==n-1:
            print(num[i], end='')
            break
        print(num[i], end=' ')
    print() i range(n) range n tmp = num[i] tmp num[i] num i j = i j i while j>0 and num[j-1] > tmp:
        num[j] = num[j-1]
        j -= 1
     j>0 and num[j-1] > tmp j>0 j 0 num[j-1] > tmp num[j-1] num j-1 j 1 tmp num[j] = num[j-1] num[j] num j num[j-1] num j-1 j 1 j -= 1 j 1 num[j] = tmp num[j] num j tmp for i in range(n):
        if i==n-1:
            print(num[i], end='')
            break
        print(num[i], end=' ')
     i range(n) range n if i==n-1:
            print(num[i], end='')
            break
         i==n-1 i n-1 n 1 print(num[i], end='') print num[i] num i end='' end '' break print(num[i], end=' ') print num[i] num i end=' ' end ' ' print() print j -= 1 1 j num = list(map(int, input().split())) list(map(int, input().split())) num tmp = num[i] num[i] tmp n = int(input()) int(input()) n j = i i j
# coding: utf-8
n = int(input())
num = list(map(int, input().split()))
for i in range(n):
    tmp = num[i]
    j = i 
    while j>0 and num[j-1] > tmp:
        num[j] = num[j-1]
        j -= 1
    num[j] = tmp
    for i in range(n):
        if i==n-1:
            print(num[i], end='')
            break
        print(num[i], end=' ')
    print()