#ACSL1819S3. ACSL1819S3

ACSL1819S3

image image image

SAMPLE INPUT

6 10 11 2 48 49
5 10 40 1 27
6 14 70 4 66 33 7 56
9 12 108 5 69 106 77 91 55
6 13 78 1 49

SAMPLE OUTPUT

ABCBE
ACDA
ABCACA
CECDE
ACDEA