# coding: utf-8
n = int(input())
data = [int(i) for i in input().split()]

for i in range(n):
    v = data[i]
    j = i - 1
    while j >= 0 and data[j] > v:
        data[j+1] = data[j]
        j -= 1
    data[j+1] = v
    print(*data) n = int(input()) n 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 data = [int(i) for i in input().split()] data [int(i) for i in input().split()] for i in range(n):
    v = data[i]
    j = i - 1
    while j >= 0 and data[j] > v:
        data[j+1] = data[j]
        j -= 1
    data[j+1] = v
    print(*data) i range(n) range n v = data[i] v data[i] data i j = i - 1 j i - 1 i 1 while j >= 0 and data[j] > v:
        data[j+1] = data[j]
        j -= 1
     j >= 0 and data[j] > v j >= 0 j 0 data[j] > v data[j] data j v data[j+1] = data[j] data[j+1] data j+1 j 1 data[j] data j j -= 1 j 1 data[j+1] = v data[j+1] data j+1 j 1 v print(*data) print *data data v = data[i] data[i] v n = int(input()) int(input()) n data = [int(i) for i in input().split()] [int(i) for i in input().split()] data j -= 1 1 j j = i - 1 i - 1 j
# coding: utf-8
n = int(input())
data = [int(i) for i in input().split()]

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