n = int(input())
l = [int(x) for x in input().split()]

for i in range(n):
    a = l[i]
    j = i - 1

    while j >= 0 and l[j] > a:
        l[j+1] = l[j]
        j = j - 1

    l[j+1] = a
    print(*l) n = int(input()) n int(input()) int input() input int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x l = [int(x) for x in input().split()] l [int(x) for x in input().split()] for i in range(n):
    a = l[i]
    j = i - 1

    while j >= 0 and l[j] > a:
        l[j+1] = l[j]
        j = j - 1

    l[j+1] = a
    print(*l) i range(n) range n a = l[i] a l[i] l i j = i - 1 j i - 1 i 1 while j >= 0 and l[j] > a:
        l[j+1] = l[j]
        j = j - 1

     j >= 0 and l[j] > a j >= 0 j 0 l[j] > a l[j] l j a l[j+1] = l[j] l[j+1] l j+1 j 1 l[j] l j j = j - 1 j j - 1 j 1 l[j+1] = a l[j+1] l j+1 j 1 a print(*l) print *l l j = j - 1 j - 1 j l = [int(x) for x in input().split()] [int(x) for x in input().split()] l a = l[i] l[i] a j = i - 1 i - 1 j n = int(input()) int(input()) n
n = int(input())
l = [int(x) for x in input().split()]

for i in range(n):
    a = l[i]
    j = i - 1

    while j >= 0 and l[j] > a:
        l[j+1] = l[j]
        j = j - 1

    l[j+1] = a
    print(*l)