URI Online Judge | 1771

Random Bingo Cards

By Victor Marcilio Peixoto, UNIVASF BR Brazil

Timelimit: 1

You asked the trainee to make a program to generate bingo cards randomly. The trainee said he knew the bingo rules and dismissed your explanations.

Guess what was the income of such hurry? The trainee simply generated 24 distinct random numbers (in the interval [1, 75] for each card, without respecting the interval each number belonged to (B -> [1, 15], I -> [16, 30], ...)).

You decided to create a program do judge the cards generated by the trainee’s program.

Input

Each test case contains a single line with 24 space separated integers. For the Picture card, the input would be the sequence: 15, 28, 36, 49, 65, 13, ..., 53, 69. The Input ends with EOF.

Output

For each analyzed card print a single line containing one of the three possible verdicts: “OK” if the card is valid or “RECICLAVEL” if it is possible to find some permutation that would make the card valid or “DESCARTAVEL” in case such permutation doesn’t exist.

Input Sample Output Sample

15 28 36 49 65 13 22 45 59 72 1 20 47 71 6 19 43 56 75 5 29 31 53 69

69 28 36 49 65 13 22 45 59 72 1 20 47 71 6 19 43 56 75 5 29 31 53 15

15 28 36 49 65 13 22 45 59 72 1 20 41 71 6 19 43 56 75 5 29 31 53 69

OK

RECICLAVEL

DESCARTAVEL