10.upto(1e4){|x|p x if"#{x}".chars.each_cons(2).all?{|a,b|a>b}}