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