n = int(input())
array = [int(a) for a in input().split()]
for i in range(n):
    j = i
    while j < n:
        if j != 0 and array[j-1] > array[j]:
            array[j-1], array[j] = array[j], array[j-1]
            j -= 1
            continue
        else:
            break
    for k in range(n):
        if k != n-1:
            print(array[k], end=' ')
        else:
            print(array[k]) n = int(input()) n int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a array = [int(a) for a in input().split()] array [int(a) for a in input().split()] for i in range(n):
    j = i
    while j < n:
        if j != 0 and array[j-1] > array[j]:
            array[j-1], array[j] = array[j], array[j-1]
            j -= 1
            continue
        else:
            break
    for k in range(n):
        if k != n-1:
            print(array[k], end=' ')
        else:
            print(array[k]) i range(n) range n j = i j i while j < n:
        if j != 0 and array[j-1] > array[j]:
            array[j-1], array[j] = array[j], array[j-1]
            j -= 1
            continue
        else:
            break
     j < n j n if j != 0 and array[j-1] > array[j]:
            array[j-1], array[j] = array[j], array[j-1]
            j -= 1
            continue
        else:
            break
     j != 0 and array[j-1] > array[j] j != 0 j 0 array[j-1] > array[j] array[j-1] array j-1 j 1 array[j] array j array[j-1], array[j] = array[j], array[j-1] array[j-1] array j-1 j 1 array[j] array j array[j] array j array[j-1] array j-1 j 1 j -= 1 j 1 continue break for k in range(n):
        if k != n-1:
            print(array[k], end=' ')
        else:
            print(array[k]) k range(n) range n if k != n-1:
            print(array[k], end=' ')
        else:
            print(array[k]) k != n-1 k n-1 n 1 print(array[k], end=' ') print array[k] array k end=' ' end ' ' print(array[k]) print array[k] array k j = i i j n = int(input()) int(input()) n array = [int(a) for a in input().split()] [int(a) for a in input().split()] array j -= 1 1 j
n = int(input())
array = [int(a) for a in input().split()]
for i in range(n):
    j = i
    while j < n:
        if j != 0 and array[j-1] > array[j]:
            array[j-1], array[j] = array[j], array[j-1]
            j -= 1
            continue
        else:
            break
    for k in range(n):
        if k != n-1:
            print(array[k], end=' ')
        else:
            print(array[k])