n = int(raw_input()) l = map(int, raw_input().split()) for i in range(2*n-3): for p in range(n-1): q = i - p if p >= q: break if l[p] > l[q]: t = l[p] l[p] = l[q] l[q] = t print ' '.join(map(str,l))