function mRandom() temp='' while #temp<9 do cr=math.random(1,9)..'' if string.find(temp, cr)==nil then temp=temp..cr end end return temp end function calc(ip) ps=0 output='' np='' for i=1,#ip do for k=1,#ip do if ip:sub(k,k)==i..'' then np=k end end jump=np-ps if jump>0 then output=output..'>'..jump ps=ps+jump elseif jump<=0 then output=output..'<'..math.abs(jump-1) ps=ps+jump-1 end end return output end while''do a=io.read('*l') print(calc(a)) end