Lazy Snakes and Ladders

Snakes and Ladders has amused children for generations. So, after the failure of his fifth start-up on a row, Edgar Hausdorff decides to go with that theme for the first app of his newly founded Hausdorff Space mobile game development company. The rules are simple:

0.60

0.40

However, Hausdorff’s lack of coding skills and moral decency makes him cut corners when implementing the code for die rolling. He grabs a real die, rolls it nn times writing down each outcome rir_i, and implements the rolls in the game by returning those values in cyclic sequence. Using the board depicted in the image, can you tell the winner given the numbers that Hausdorff rolled? Every given case is guaranteed to eventually finish.

Input

Input consists of several cases, each with nn followed by the rir_i’s, with 1ri61 \le r_i \le 6.

Output

For each case, print “RED” or “BLUE” depending on the winner.

Problem information

Author: Edgar Gonzàlez

Generation: 2026-01-25T10:34:46.368Z

© Jutge.org, 2006–2026.
https://jutge.org