_n = int(raw_input())
_a = [int(x) for x in raw_input().split()]

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

for i in range(1, _n):
    print(" ".join([str(x) for x in _a]))
    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([str(x) for x in _a]))