open String;; let rec f s=try f(input_line stdin::s)with End_of_file->s in let c x y=let l,r=length x,length y in if l=r then compare x y else l-r in List.map (fun x->print_string (x^"\n")) (List.sort c (f []));;