let () = seq { for i = 0 to 2 do let h, w = stdin.ReadLine () |> fun s -> s.Split() |> fun arr -> (int arr.[0], int arr.[1]) let c = 'A' |> int |> fun x -> x + i |> char yield (c, h, w) } |> Seq.sortBy (fun (_, h, w) -> (-h, w)) |> Seq.iter (fun (c, _, _) -> printfn "%c" c)