num = int(raw_input())
line = raw_input()

A = line.strip().split(" ")
print " ".join(A)
#A = map(int, item_str)

for i in range(1, num):
    v = int(A[i])
    j = i - 1
    for j in range(j, -1, -1):
        if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = str(v)
    #A_str = map(str, A)
    print " ".join(A) num = int(raw_input()) num int(raw_input()) int raw_input() raw_input line = raw_input() line raw_input() raw_input A = line.strip().split(" ") A line.strip().split(" ") line.strip().split line.strip() line.strip line strip split " " print " ".join(A) " ".join " " join A for i in range(1, num):
    v = int(A[i])
    j = i - 1
    for j in range(j, -1, -1):
        if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = str(v)
    #A_str = map(str, A)
    print " ".join(A) i range(1, num) range 1 num v = int(A[i]) v int(A[i]) int A[i] A i j = i - 1 j i - 1 i 1 for j in range(j, -1, -1):
        if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
     j range(j, -1, -1) range j -1 -1 if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
     int(A[j]) > v int(A[j]) int 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 break A[j+1] = str(v) A[j+1] A j+1 j 1 str(v) str v print " ".join(A) " ".join " " join A j = i - 1 i - 1 j v = int(A[i]) int(A[i]) v num = int(raw_input()) int(raw_input()) num line = raw_input() raw_input() line A = line.strip().split(" ") line.strip().split(" ") A j -= 1 1 j
num = int(raw_input())
line = raw_input()

A = line.strip().split(" ")
print " ".join(A)
#A = map(int, item_str)

for i in range(1, num):
    v = int(A[i])
    j = i - 1
    for j in range(j, -1, -1):
        if int(A[j]) > v:
            A[j+1] = A[j]
            j -= 1
        else:
            break
    A[j+1] = str(v)
    #A_str = map(str, A)
    print " ".join(A)