for n=10,1e4 do m=n f=1<0 while(m>9)do a=(m-m%10)/10 f=f or m%10>=a%10 m=a end x=f or print(n)end