Have you ever heard of Melodramia, my friend? It is a land of magic forests and mysterious swamps, of sprinting
Have you ever heard of Melodramia, my friend? It is a land of magic forests and mysterious swamps, of sprinting heroines and dashing heroes. And it is home to two dragons, Rose and Scarlet, who, despite their competitive streak, are the best of friends.
Rose and Scarlet love playing snap tag, a game for two players on a grid. The game goes as follows:
The two dragons start on different squares.
It's Rose's turn first. On her turn, she must move to an adjacent square (i.e. she must make one step left, right, up, or down).
It's Scarlet's turn next. On her turn, she must move to an adjacent square.
The two dragons continue alternating turns..
...until one dragon lands on the same square as another. When this happens, the dragon who moved last shouts `Snap tag!' and wins the game.
Rose and Scarlet are both snap tag experts and always find a winning strategy if one exists. If it is not possible for either player to gain the upper hand, then the game goes on forever.
In this task, you are given the size of the grid and the starting locations of both dragons.
Does Rose win? Does Scarlet win? Does the game go on forever?
The input variables are integers where:
R and C are the numbers of rows and columns in the grid, respectively;
rROSE and cROSE are the row and column of Rose's starting square (rows are numbered 1 to R from top to bottom; columns are numbered 1 to C from left to right); and
rSCARLET and cSCARLET are the row and column of Scarlet's starting square.
The output should consist of a single upper-case word with no punctuation.
If Rose can guarantee herself a win, output "ROSE".
If Scarlet can guarantee herself a win, output "SCARLET".
If neither player can guarantee a win, output "DRAW".