let rec f?(l=read_line())_=f(Printf.printf"%d "(int_of_string(max("0o"^l)l)));;f()