n=input()
num_list=[int(x) for x in raw_input().split(" ")]

for idx in range(1, len(num_list)):
    print " ".join([str(x) for x in num_list])
    key=num_list[idx]
    jdx = idx - 1
    
    while jdx >= 0 and num_list[jdx] > key:
        num_list[jdx+1] = num_list[jdx]
        jdx -= 1
    num_list[jdx+1] = key
print " ".join([str(x) for x in num_list]) n=input() n input() input int(x) for x in raw_input().split(" ") for x in raw_input().split(" ") x raw_input().split(" ") ().split () raw_input split " " for x in raw_input().split(" ") int(x) int x num_list=[int(x) for x in raw_input().split(" ")] num_list [int(x) for x in raw_input().split(" ")] for idx in range(1, len(num_list)):
    print " ".join([str(x) for x in num_list])
    key=num_list[idx]
    jdx = idx - 1
    
    while jdx >= 0 and num_list[jdx] > key:
        num_list[jdx+1] = num_list[jdx]
        jdx -= 1
    num_list[jdx+1] = key idx range(1, len(num_list)) range 1 len(num_list) len num_list print str(x) for x in num_list for x in num_list x num_list for x in num_list str(x) str x " ".join([str(x) for x in num_list]) " ".join " " join [str(x) for x in num_list] key=num_list[idx] key num_list[idx] num_list idx jdx = idx - 1 jdx idx - 1 idx 1 while jdx >= 0 and num_list[jdx] > key:
        num_list[jdx+1] = num_list[jdx]
        jdx -= 1
     jdx >= 0 and num_list[jdx] > key jdx >= 0 jdx 0 num_list[jdx] > key num_list[jdx] num_list jdx key num_list[jdx+1] = num_list[jdx] num_list[jdx+1] num_list jdx+1 jdx 1 num_list[jdx] num_list jdx jdx -= 1 jdx 1 num_list[jdx+1] = key num_list[jdx+1] num_list jdx+1 jdx 1 key print str(x) for x in num_list for x in num_list x num_list for x in num_list str(x) str x " ".join([str(x) for x in num_list]) " ".join " " join [str(x) for x in num_list] n=input() input() n num_list=[int(x) for x in raw_input().split(" ")] [int(x) for x in raw_input().split(" ")] num_list jdx = idx - 1 idx - 1 jdx jdx -= 1 1 jdx key=num_list[idx] num_list[idx] key
n=input()
num_list=[int(x) for x in raw_input().split(" ")]

for idx in range(1, len(num_list)):
    print " ".join([str(x) for x in num_list])
    key=num_list[idx]
    jdx = idx - 1
    
    while jdx >= 0 and num_list[jdx] > key:
        num_list[jdx+1] = num_list[jdx]
        jdx -= 1
    num_list[jdx+1] = key
print " ".join([str(x) for x in num_list])