n = int(input())
a = input()
print(a)
a = [int(x) for x in a.split(' ')]

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

for i in range(1, n):
    v = a[i]
    j = i - 1
    while j >= 0 and a[j] > v:
        a[j + 1] = a[j]
        j -= 1
    a[j + 1] = v
    print(' '.join([str(x) for x in a]))