import algorithm, sequtils, strutils

let
  height = 3.newSeqWith parseInt readLine stdin
  xs = ["A", "B", "C"]
var
  z = height.zip xs

z.sort Descending

for (_, x) in z:
  echo x