n = raw_input()

A = map(int, raw_input().split())

for i, key in enumerate(A):

    j = i - 1

    while(j >= 0 and A[j] > key):
        A[j+1] = A[j]
        j -= 1

    A[j+1] = key

    for x in A:
        print x,
    print n = raw_input() n raw_input() raw_input A = map(int, raw_input().split()) A map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split for i, key in enumerate(A):

    j = i - 1

    while(j >= 0 and A[j] > key):
        A[j+1] = A[j]
        j -= 1

    A[j+1] = key

    for x in A:
        print x,
    print i key enumerate(A) enumerate A j = i - 1 j i - 1 i 1 while(j >= 0 and A[j] > key):
        A[j+1] = A[j]
        j -= 1

     j >= 0 and A[j] > key j >= 0 j 0 A[j] > key A[j] A j key A[j+1] = A[j] A[j+1] A j+1 j 1 A[j] A j j -= 1 j 1 A[j+1] = key A[j+1] A j+1 j 1 key for x in A:
        print x,
     x A print x print j = i - 1 i - 1 j n = raw_input() raw_input() n A = map(int, raw_input().split()) map(int, raw_input().split()) A j -= 1 1 j
n = raw_input()

A = map(int, raw_input().split())

for i, key in enumerate(A):

    j = i - 1

    while(j >= 0 and A[j] > key):
        A[j+1] = A[j]
        j -= 1

    A[j+1] = key

    for x in A:
        print x,
    print