length = int(input())
eles = [int(i) for i in input().split()]

for i in range(length):
    val = eles[i]
    j = i - 1
    while j >= 0 and eles[j] > val:
        eles[j+1] = eles[j]
        j -= 1
    eles[j+1] = val
    print(*eles) length = int(input()) length int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i eles = [int(i) for i in input().split()] eles [int(i) for i in input().split()] for i in range(length):
    val = eles[i]
    j = i - 1
    while j >= 0 and eles[j] > val:
        eles[j+1] = eles[j]
        j -= 1
    eles[j+1] = val
    print(*eles) i range(length) range length val = eles[i] val eles[i] eles i j = i - 1 j i - 1 i 1 while j >= 0 and eles[j] > val:
        eles[j+1] = eles[j]
        j -= 1
     j >= 0 and eles[j] > val j >= 0 j 0 eles[j] > val eles[j] eles j val eles[j+1] = eles[j] eles[j+1] eles j+1 j 1 eles[j] eles j j -= 1 j 1 eles[j+1] = val eles[j+1] eles j+1 j 1 val print(*eles) print *eles eles j = i - 1 i - 1 j j -= 1 1 j val = eles[i] eles[i] val length = int(input()) int(input()) length eles = [int(i) for i in input().split()] [int(i) for i in input().split()] eles
length = int(input())
eles = [int(i) for i in input().split()]

for i in range(length):
    val = eles[i]
    j = i - 1
    while j >= 0 and eles[j] > val:
        eles[j+1] = eles[j]
        j -= 1
    eles[j+1] = val
    print(*eles)