order = gets.split.map(&:to_i)

def qsort(list)
  return list if list.size <= 1
  
  pivot = list[list.size - 1]
  lesser = []
  greater = []
  list.take(list.size - 1).each do |e|
    if e <= pivot
      lesser.push e
    else
      greater.push e
    end
  end
  return qsort(lesser) + [pivot] + qsort(greater)
end

puts qsort(order).join(' ')

