b=16 for i=1,1e4 do b=16~=tonumber(i..'',b)and b or print(i)or b-1 end