import std.experimental.all; T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int; void main() { auto a = readints; auto b = readints; auto c = readints; auto xs = [[-a[0], a[1], 0], [-b[0], b[1], 1], [-c[0], c[1], 2]]; foreach (x; xs.sort().map!(e => e[2])) writeln(to!char(x + 'A')); }