n = int(input())

arrey = [int(i) for i in input().split()]

for i in range(n):
    v = arrey[i]
    j = i - 1
    while j >= 0 and arrey[j] > v:
        arrey[j+1] = arrey[j]
        j = j - 1
        arrey[j+1] = v
    for k in range(n):
        print(arrey[k]) if k == n-1 else print(str(arrey[k])+' ',end='') n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i arrey = [int(i) for i in input().split()] arrey [int(i) for i in input().split()] for i in range(n):
    v = arrey[i]
    j = i - 1
    while j >= 0 and arrey[j] > v:
        arrey[j+1] = arrey[j]
        j = j - 1
        arrey[j+1] = v
    for k in range(n):
        print(arrey[k]) if k == n-1 else print(str(arrey[k])+' ',end='') i range(n) range n v = arrey[i] v arrey[i] arrey i j = i - 1 j i - 1 i 1 while j >= 0 and arrey[j] > v:
        arrey[j+1] = arrey[j]
        j = j - 1
        arrey[j+1] = v
     j >= 0 and arrey[j] > v j >= 0 j 0 arrey[j] > v arrey[j] arrey j v arrey[j+1] = arrey[j] arrey[j+1] arrey j+1 j 1 arrey[j] arrey j j = j - 1 j j - 1 j 1 arrey[j+1] = v arrey[j+1] arrey j+1 j 1 v for k in range(n):
        print(arrey[k]) if k == n-1 else print(str(arrey[k])+' ',end='') k range(n) range n print(arrey[k]) if k == n-1 else print(str(arrey[k])+' ',end='') k == n-1 k n-1 n 1 print(arrey[k]) print arrey[k] arrey k print(str(arrey[k])+' ',end='') print str(arrey[k])+' ' str(arrey[k]) str arrey[k] arrey k ' ' end='' end '' v = arrey[i] arrey[i] v j = j - 1 j - 1 j arrey = [int(i) for i in input().split()] [int(i) for i in input().split()] arrey j = i - 1 i - 1 j n = int(input()) int(input()) n
n = int(input())

arrey = [int(i) for i in input().split()]

for i in range(n):
    v = arrey[i]
    j = i - 1
    while j >= 0 and arrey[j] > v:
        arrey[j+1] = arrey[j]
        j = j - 1
        arrey[j+1] = v
    for k in range(n):
        print(arrey[k]) if k == n-1 else print(str(arrey[k])+' ',end='')