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