N = int(input())
A = [int(i) for i in input().split()]
print(' '.join([str(A[i]) for i in range(0, N)]))
for i in range(1, N):
    v = int(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(A[i]) for i in range(0, N)])) 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 A = [int(i) for i in input().split()] A [int(i) for i in input().split()] str(A[i]) for i in range(0, N) for i in range(0, N) i range(0, N) range 0 N for i in range(0, N) str(A[i]) str A[i] A i print(' '.join([str(A[i]) for i in range(0, N)])) print ' '.join([str(A[i]) for i in range(0, N)]) ' '.join ' ' join [str(A[i]) for i in range(0, N)] for i in range(1, N):
    v = int(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(A[i]) for i in range(0, N)])) i range(1, N) range 1 N v = int(A[i]) v int(A[i]) int 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(A[i]) for i in range(0, N) for i in range(0, N) i range(0, N) range 0 N for i in range(0, N) str(A[i]) str A[i] A i print(' '.join([str(A[i]) for i in range(0, N)])) print ' '.join([str(A[i]) for i in range(0, N)]) ' '.join ' ' join [str(A[i]) for i in range(0, N)] N = int(input()) int(input()) N v = int(A[i]) int(A[i]) v j -= 1 1 j A = [int(i) for i in input().split()] [int(i) for i in input().split()] A j = i - 1 i - 1 j
N = int(input())
A = [int(i) for i in input().split()]
print(' '.join([str(A[i]) for i in range(0, N)]))
for i in range(1, N):
    v = int(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(A[i]) for i in range(0, N)]))