n = int(input())
v = list(map(int, input().split()))

res = v.copy()

for i in range(n):
    if i == 0:
        pass
    else:
        for j in range(i):
            if res[j] > v[i]:
                res.pop(i)
                res.insert(j, v[i])
                break

    print(" ".join([str(x) for x in res])) n = int(input()) n int(input()) int input() input v = list(map(int, input().split())) v list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split res = v.copy() res v.copy() v.copy v copy for i in range(n):
    if i == 0:
        pass
    else:
        for j in range(i):
            if res[j] > v[i]:
                res.pop(i)
                res.insert(j, v[i])
                break

    print(" ".join([str(x) for x in res])) i range(n) range n if i == 0:
        pass
    else:
        for j in range(i):
            if res[j] > v[i]:
                res.pop(i)
                res.insert(j, v[i])
                break

     i == 0 i 0 for j in range(i):
            if res[j] > v[i]:
                res.pop(i)
                res.insert(j, v[i])
                break

     j range(i) range i if res[j] > v[i]:
                res.pop(i)
                res.insert(j, v[i])
                break

     res[j] > v[i] res[j] res j v[i] v i res.pop(i) res.pop res pop i res.insert(j, v[i]) res.insert res insert j v[i] v i break str(x) for x in res for x in res x res for x in res str(x) str x print(" ".join([str(x) for x in res])) print " ".join([str(x) for x in res]) " ".join " " join [str(x) for x in res] res = v.copy() v.copy() res n = int(input()) int(input()) n v = list(map(int, input().split())) list(map(int, input().split())) v
n = int(input())
v = list(map(int, input().split()))

res = v.copy()

for i in range(n):
    if i == 0:
        pass
    else:
        for j in range(i):
            if res[j] > v[i]:
                res.pop(i)
                res.insert(j, v[i])
                break

    print(" ".join([str(x) for x in res]))
