for i=10,10000 do f=1;s=''..i for j=1,#s-1 do f=f and s:sub(j,j)>s:sub(j+1,j+1)end if f then print(i)end end