n = int(input())
data = list(map(int, 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(" ".join(map(str, data))) n = int(input()) n int(input()) int input() input data = list(map(int, input().split())) data list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () 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(" ".join(map(str, 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(" ".join(map(str, data))) print " ".join(map(str, data)) " ".join " " join map(str, data) map str data data = list(map(int, input().split())) list(map(int, input().split())) data j = i - 1 i - 1 j n = int(input()) int(input()) n v = data[i] data[i] v j -= 1 1 j
n = int(input())
data = list(map(int, 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(" ".join(map(str, data)))