open String let rec f s=try f(read_line()::s)with|_->print_string(concat" "(List.sort(fun x y->2*(length x-length y)+compare x y)s));;f[]