n=gets.to_i xs=gets.split.map{|e| e.to_i} (1..(n*2-4)).each{|i| n.times{|p1| q=i-p1 break if p1>=q next if q>=n if xs[p1]>xs[q] t=xs[p1] xs[p1]=xs[q] xs[q]=t end } } puts xs*" "