import strutils, sequtils, algorithm const n = 3 var h, w = newSeq[int](n) arr = newSeq[string]() for i in 0 ..< n: (h[i], w[i]) = stdin.readLine.split.map parseInt arr.add $h[i] & $(200 - w[i]) & (i + 'A'.ord).chr for v in arr.sorted(cmp, Descending): echo v[^1]