import strutils, sequtils, algorithm const n = 3 var prsn = newSeq[tuple[name: char, h, w: int]](n) for i in 0 ..< n: (prsn[i].h, prsn[i].w) = stdin.readLine.split.map parseInt prsn[i].name = ('A'.int + i).chr for p in sortedByIt(prsn, (-it.h, it.w)): echo p.name