N = int(input())
l = list(map(int, input().split()))
for i in range(N):
    t = l[i]
    j = i-1
    while j >= 0 and l[j] > t:
        l[j+1], l[j] = l[j], l[j+1]
        j -= 1
    print(*l) N = int(input()) N int(input()) int input() input l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(N):
    t = l[i]
    j = i-1
    while j >= 0 and l[j] > t:
        l[j+1], l[j] = l[j], l[j+1]
        j -= 1
    print(*l) i range(N) range N t = l[i] t l[i] l i j = i-1 j i-1 i 1 while j >= 0 and l[j] > t:
        l[j+1], l[j] = l[j], l[j+1]
        j -= 1
     j >= 0 and l[j] > t j >= 0 j 0 l[j] > t l[j] l j t l[j+1], l[j] = l[j], l[j+1] l[j+1] l j+1 j 1 l[j] l j l[j] l j l[j+1] l j+1 j 1 j -= 1 j 1 print(*l) print *l l j -= 1 1 j l = list(map(int, input().split())) list(map(int, input().split())) l t = l[i] l[i] t N = int(input()) int(input()) N j = i-1 i-1 j
N = int(input())
l = list(map(int, input().split()))
for i in range(N):
    t = l[i]
    j = i-1
    while j >= 0 and l[j] > t:
        l[j+1], l[j] = l[j], l[j+1]
        j -= 1
    print(*l)