n = int(input())
lst = list(map(int, input().split()))
for i in range(n):
    li = lst[i]
    j = i-1
    while j >= 0 and lst[j] > li:
        lst[j:j+2] = lst[j+1], lst[j]
        j -= 1
    print(*lst) n = int(input()) n int(input()) int input() input lst = list(map(int, input().split())) lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(n):
    li = lst[i]
    j = i-1
    while j >= 0 and lst[j] > li:
        lst[j:j+2] = lst[j+1], lst[j]
        j -= 1
    print(*lst) i range(n) range n li = lst[i] li lst[i] lst i j = i-1 j i-1 i 1 while j >= 0 and lst[j] > li:
        lst[j:j+2] = lst[j+1], lst[j]
        j -= 1
     j >= 0 and lst[j] > li j >= 0 j 0 lst[j] > li lst[j] lst j li lst[j:j+2] = lst[j+1], lst[j] lst[j:j+2] lst j:j+2 j j+2 j 2 lst[j:j+2] = lst[j+1], lst[j] lst[j+1] lst j+1 j 1 lst[j] lst j j -= 1 j 1 print(*lst) print *lst lst j -= 1 1 j lst = list(map(int, input().split())) list(map(int, input().split())) lst li = lst[i] lst[i] li j = i-1 i-1 j n = int(input()) int(input()) n
n = int(input())
lst = list(map(int, input().split()))
for i in range(n):
    li = lst[i]
    j = i-1
    while j >= 0 and lst[j] > li:
        lst[j:j+2] = lst[j+1], lst[j]
        j -= 1
    print(*lst)