
n = raw_input()
num = raw_input()
array = []
array = num.strip().split(" ")
int_array = map(int, array)

for i in range(1, int(n)):
    array = map(str, int_array)
    print " ".join(array)
    v = int_array[i]
    j = i - 1
    while j >= 0 and int_array[j] > v:
        int_array[j + 1] = int_array[j]
        j -= 1
    int_array[j + 1] = v
array = map(str, int_array)
print " ".join(array) n = raw_input() n raw_input() raw_input num = raw_input() num raw_input() raw_input array = [] array [] array = num.strip().split(" ") array num.strip().split(" ") num.strip().split num.strip() num.strip num strip split " " int_array = map(int, array) int_array map(int, array) map int array for i in range(1, int(n)):
    array = map(str, int_array)
    print " ".join(array)
    v = int_array[i]
    j = i - 1
    while j >= 0 and int_array[j] > v:
        int_array[j + 1] = int_array[j]
        j -= 1
    int_array[j + 1] = v i range(1, int(n)) range 1 int(n) int n array = map(str, int_array) array map(str, int_array) map str int_array print " ".join(array) " ".join " " join array v = int_array[i] v int_array[i] int_array i j = i - 1 j i - 1 i 1 while j >= 0 and int_array[j] > v:
        int_array[j + 1] = int_array[j]
        j -= 1
     j >= 0 and int_array[j] > v j >= 0 j 0 int_array[j] > v int_array[j] int_array j v int_array[j + 1] = int_array[j] int_array[j + 1] int_array j + 1 j 1 int_array[j] int_array j j -= 1 j 1 int_array[j + 1] = v int_array[j + 1] int_array j + 1 j 1 v array = map(str, int_array) array map(str, int_array) map str int_array print " ".join(array) " ".join " " join array int_array = map(int, array) map(int, array) int_array array = num.strip().split(" ") num.strip().split(" ") array array = map(str, int_array) map(str, int_array) array array = [] [] array j -= 1 1 j v = int_array[i] int_array[i] v n = raw_input() raw_input() n num = raw_input() raw_input() num array = map(str, int_array) map(str, int_array) array j = i - 1 i - 1 j

n = raw_input()
num = raw_input()
array = []
array = num.strip().split(" ")
int_array = map(int, array)

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