-module m. -export [m/0]. m()->try io:write(apply(erlang,list_to_integer,fun("0x"++N)->[N,16];("0"++N)when N/=[]->[N,8];(N)->[N,10]end(io:get_line('')--[10]))),io:nl(),m()catch _:_->m end.