n = int(input())
lst = map(int,raw_input().split())
for i in range(len(lst)):
    v = lst[i]
    j = i - 1
    while j >= 0 and lst[j] > v:
        lst[j+1] = lst[j]
        j -= 1
    lst[j+1] = v
    print ' '.join(map(str, lst)) n = int(input()) n int(input()) int input() input lst = map(int,raw_input().split()) lst map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split for i in range(len(lst)):
    v = lst[i]
    j = i - 1
    while j >= 0 and lst[j] > v:
        lst[j+1] = lst[j]
        j -= 1
    lst[j+1] = v
    print ' '.join(map(str, lst)) i range(len(lst)) range len(lst) len lst v = lst[i] v lst[i] lst i j = i - 1 j i - 1 i 1 while j >= 0 and lst[j] > v:
        lst[j+1] = lst[j]
        j -= 1
     j >= 0 and lst[j] > v j >= 0 j 0 lst[j] > v lst[j] lst j v lst[j+1] = lst[j] lst[j+1] lst j+1 j 1 lst[j] lst j j -= 1 j 1 lst[j+1] = v lst[j+1] lst j+1 j 1 v print ' '.join(map(str, lst)) ' '.join ' ' join map(str, lst) map str lst v = lst[i] lst[i] v n = int(input()) int(input()) n j = i - 1 i - 1 j lst = map(int,raw_input().split()) map(int,raw_input().split()) lst j -= 1 1 j
n = int(input())
lst = map(int,raw_input().split())
for i in range(len(lst)):
    v = lst[i]
    j = i - 1
    while j >= 0 and lst[j] > v:
        lst[j+1] = lst[j]
        j -= 1
    lst[j+1] = v
    print ' '.join(map(str, lst))