n = int(input()) sq = list(map(int, input().split())) st = [] for i in range(1,2*n-3): j = 0 while i >= 0: if j < i <= n-1: st.append([j,i]) j += 1 i -= 1 for i in st: if sq[i[0]] > sq[i[1]]: sq[i[0]],sq[i[1]] = sq[i[1]],sq[i[0]] print(" ".join([str(i) for i in sq]))