n = int(input())
arr = []
s = input().split()
for i in range(n):
    arr.append(int(s[i]))
for i in range(n):
    k = arr[i]
    j = i - 1
    while j >= 0 and arr[j] > k:
        arr[j+1] = arr[j]
        j -= 1
    arr[j+1] = k
    for i in range(n):
        if i == n-1:
            print(arr[i])
        else:
            print(arr[i], end=" ") n = int(input()) n int(input()) int input() input arr = [] arr [] s = input().split() s input().split() ().split () input split for i in range(n):
    arr.append(int(s[i])) i range(n) range n arr.append(int(s[i])) arr.append arr append int(s[i]) int s[i] s i for i in range(n):
    k = arr[i]
    j = i - 1
    while j >= 0 and arr[j] > k:
        arr[j+1] = arr[j]
        j -= 1
    arr[j+1] = k
    for i in range(n):
        if i == n-1:
            print(arr[i])
        else:
            print(arr[i], end=" ") i range(n) range n k = arr[i] k arr[i] arr i j = i - 1 j i - 1 i 1 while j >= 0 and arr[j] > k:
        arr[j+1] = arr[j]
        j -= 1
     j >= 0 and arr[j] > k j >= 0 j 0 arr[j] > k arr[j] arr j k arr[j+1] = arr[j] arr[j+1] arr j+1 j 1 arr[j] arr j j -= 1 j 1 arr[j+1] = k arr[j+1] arr j+1 j 1 k for i in range(n):
        if i == n-1:
            print(arr[i])
        else:
            print(arr[i], end=" ") i range(n) range n if i == n-1:
            print(arr[i])
        else:
            print(arr[i], end=" ") i == n-1 i n-1 n 1 print(arr[i]) print arr[i] arr i print(arr[i], end=" ") print arr[i] arr i end=" " end " " s = input().split() input().split() s j = i - 1 i - 1 j n = int(input()) int(input()) n k = arr[i] arr[i] k j -= 1 1 j arr = [] [] arr
n = int(input())
arr = []
s = input().split()
for i in range(n):
    arr.append(int(s[i]))
for i in range(n):
    k = arr[i]
    j = i - 1
    while j >= 0 and arr[j] > k:
        arr[j+1] = arr[j]
        j -= 1
    arr[j+1] = k
    for i in range(n):
        if i == n-1:
            print(arr[i])
        else:
            print(arr[i], end=" ")