Scanf.scanf "%s" (fun s -> let a = Array.make 13 0 in String.iter (fun c -> let q = int_of_char c - 97 in a.(q) <- a.(q) + 1) s; let a = Array.mapi (fun i v -> v, i) a in Array.sort compare a; if fst a.(12) > 2 || fst a.(11) > 1 then print_endline "Impossible" else if fst a.(0) = 1 then ( String.iter (fun c -> Printf.printf "%c\n" c) "abcdefghijklm" ) else Printf.printf "%c\n" "abcdefghijklm".[snd a.(0)] )