cho.sh
Notes
Loading...

Yutnori Throw Classification

Time limit

1s

Memory limit

128 MB

Problem

Yutnori is a traditional game played by throwing four sticks. Each stick lands with either its belly side (0) or back side (1) facing up, and the result is determined from those four values.

If exactly 1 stick shows belly, the result is do; if 2 show belly, it is gae; if 3 show belly, it is geol; if all 4 show belly, it is yut. If no stick shows belly and all four show back, the result is mo.

Given the states of three throws, write a program that classifies each throw.

Input

The input consists of three lines. Each line contains four integers, each either 0 or 1, describing one throw. 0 means belly side and 1 means back side.

Output

Print one line for each of the three throws.

Print A for do, B for gae, C for geol, D for yut, and E for mo.