Page not loading? Try clicking here.
Placeholder

#1744

Yutnori 1s 32MB

Problems

Yutnori, a traditional Korean game, determines Do, Gae, Geol, Yut, and Mo by throwing four Yut sticks and counting the number of bellies (0) and backs (1) that appear.

 

Write a program that determines which of the following results is obtained—Do (one belly, three backs), Gae (two bellies, two backs), Geol (three bellies, one back), Yut (four bellies), or Mo (four backs)—given the information on whether each of the four Yut sticks landed on its belly or back.


Input

From the first line to the third line, four integers (0 or 1) representing the state of the yut sticks thrown once are given on each line, separated by spaces.

Output

Print the results from the first line to the third line, one per line, with Do as A, Gae as B, Geol as C, Yut as D, and Mo as E.

Example

0 1 0 1

1 1 1 0
0 0 1 1
B

A
B


Source

KOI 본선 2009 초1

You must sign in to write code.