data_num = int(input())
data = [int(n) for n in input().split(' ')]

for i in range(0, data_num):
    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([str(n) for n in data])) data_num = int(input()) data_num int(input()) int input() input int(n) for n in input().split(' ') for n in input().split(' ') n input().split(' ') ().split () input split ' ' for n in input().split(' ') int(n) int n data = [int(n) for n in input().split(' ')] data [int(n) for n in input().split(' ')] for i in range(0, data_num):
    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([str(n) for n in data])) i range(0, data_num) range 0 data_num 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 str(n) for n in data for n in data n data for n in data str(n) str n print(' '.join([str(n) for n in data])) print ' '.join([str(n) for n in data]) ' '.join ' ' join [str(n) for n in data] data_num = int(input()) int(input()) data_num data = [int(n) for n in input().split(' ')] [int(n) for n in input().split(' ')] data j -= 1 1 j j = i - 1 i - 1 j v = data[i] data[i] v
data_num = int(input())
data = [int(n) for n in input().split(' ')]

for i in range(0, data_num):
    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([str(n) for n in data]))