n = input()
a = map(int, raw_input().split())

for i in range(n):
    key = a[i]
    j = i - 1
    while j >= 0 and a[j] > key:
        a[j + 1] = a[j]
        j -= 1
    a[j + 1] = key
    print(" ".join(map(str, a))) n = input() n input() input a = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split for i in range(n):
    key = a[i]
    j = i - 1
    while j >= 0 and a[j] > key:
        a[j + 1] = a[j]
        j -= 1
    a[j + 1] = key
    print(" ".join(map(str, a))) i range(n) range n key = a[i] key a[i] a i 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 print(" ".join(map(str, a))) print " ".join(map(str, a)) " ".join " " join map(str, a) map str a n = input() input() n key = a[i] a[i] key j = i - 1 i - 1 j a = map(int, raw_input().split()) map(int, raw_input().split()) a j -= 1 1 j
n = input()
a = map(int, raw_input().split())

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