gets;c=gets.split.map &:to_i 9.downto(1){|i|c[i-1].times{print i}}