N = gets.to_i
A = gets.split.map(&:to_i)
O = (0 ... N).to_a.combination(2).group_by{|x,y| x + y }
(1 ... 2 * N - 3).each do |i|
  O[i]&.each do |x,y|
    if A[x] > A[y]
      t = A[x]
      A[x] = A[y]
      A[y] = t
    end
  end
end
puts A * ' '