open List let rec s r=begin try s(read_line()::r)with End_of_file->r end and f a b=if a=0then b else a;; iter(fun x->print_endline(snd x))(sort (fun a b->f (compare (fst a) (fst b))(compare (snd a) (snd b))) (map (fun l->(String.length l,l)) (s [])));;