n = int(raw_input())
arr = map(int, raw_input().split(' '))

p = 1
print ' '.join(map(str, arr))
while True:
    if p >= len(arr):
        break
    for j in range(0,p):
        if arr[p] < arr[j]:
            arr[p],arr[j] = arr[j],arr[p]
    p += 1
    print ' '.join(map(str, arr)) n = int(raw_input()) n int(raw_input()) int raw_input() raw_input arr = map(int, raw_input().split(' ')) arr map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' p = 1 p 1 print ' '.join(map(str, arr)) ' '.join ' ' join map(str, arr) map str arr while True:
    if p >= len(arr):
        break
    for j in range(0,p):
        if arr[p] < arr[j]:
            arr[p],arr[j] = arr[j],arr[p]
    p += 1
    print ' '.join(map(str, arr)) True if p >= len(arr):
        break
     p >= len(arr) p len(arr) len arr break for j in range(0,p):
        if arr[p] < arr[j]:
            arr[p],arr[j] = arr[j],arr[p]
     j range(0,p) range 0 p if arr[p] < arr[j]:
            arr[p],arr[j] = arr[j],arr[p]
     arr[p] < arr[j] arr[p] arr p arr[j] arr j arr[p],arr[j] = arr[j],arr[p] arr[p] arr p arr[j] arr j arr[j] arr j arr[p] arr p p += 1 p 1 print ' '.join(map(str, arr)) ' '.join ' ' join map(str, arr) map str arr p = 1 1 p n = int(raw_input()) int(raw_input()) n p += 1 1 p arr = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) arr
n = int(raw_input())
arr = map(int, raw_input().split(' '))

p = 1
print ' '.join(map(str, arr))
while True:
    if p >= len(arr):
        break
    for j in range(0,p):
        if arr[p] < arr[j]:
            arr[p],arr[j] = arr[j],arr[p]
    p += 1
    print ' '.join(map(str, arr))