P8344 "Wdoi-6" Walking at Night in Rendaino

Background

[![](https://cdn.luogu.com.cn/upload/image_hosting/8brkt9is.png)](https://thwiki.cc/%E8%8E%B2%E5%8F%B0%E9%87%8E%E5%A4%9C%E8%A1%8C) In the Scientific Century, science is thriving and information technology is highly developed. But at the same time, imagination has died out. Things that cannot be explained are erased as “errors”, and mysteries that cannot be explained are denied. Usami Renko (Renko) and Maribel Hearn (Merry) founded a club—the Hifuu Club. As members of the Hifuu Club, they search for the boundary of fantasy, and in a world that is gradually being forgotten, they pursue what is truly beautiful. Their first activity is to explore a breach in the barrier of Rendaino.

Description

### Brief Statement There are $x$ golden planks, $y$ silver planks, and an empty container that can hold $z$ planks. Each time you put one golden plank into the container, **after that**, all silver planks currently in the container will be discarded (you must ensure that before putting in the golden plank, the container still has room for at least one more plank). Ask whether there exists a way such that all planks have **been put into** the container at least once. ------ ### Original Statement At the entrance of Rendaino, Renko and Merry want to cross the boundary between reality and illusion and enter Gensokyo. However, crossing the boundary has certain requirements. Specifically, beside the boundary there are several long planks: $x$ of them are golden planks, and $y$ of them are silver planks. Using her ability to see the boundary, Merry found a container that can hold $z$ planks, and learned the rules through her subconscious: - If they put in a golden plank (you must ensure that before putting in the golden plank, the container still has room for at least one more plank), then **all** silver planks **in the container** will be discarded. - In the end, **all** planks must have **been put into** the container, and only then will the gate of the boundary open, i.e., they can enter Gensokyo. It is now 2:27:41 a.m. Only if they finish this task before 2:30 a.m. can they enter Gensokyo. Renko and Merry now hand this problem to you, hoping you can give an answer as soon as possible: is there a plan that allows them to enter Gensokyo? Since Renko and Merry worry that you might fool them in the middle of the night, they will ask you a total of $T$ times.

Input Format

- The first line contains a positive integer $T$, representing the number of test cases. - Starting from the second line, the next $T$ lines each contain three positive integers $x, y, z$, with meanings as described in the statement.

Output Format

For each query, output one line with the answer. If there exists a plan, output `Renko`; otherwise, output `Merry`.

Explanation/Hint

### Sample Explanation #### Sample \#1 - For the first query, one feasible plan is: - First put in three silver planks. - Then put in one golden plank. - Then put in two silver planks. - Then put in one golden plank. - Then put in one silver plank. - This way, every plank has been put into the container at least once, so Renko and Merry can enter Gensokyo. Therefore output `Renko`. - For the second query, clearly there is no plan. - For the third query, you can first put in ten golden planks, then put in ten silver planks. #### Sample \#2 This sample set satisfies the requirements of $\textbf{subtask 2}$. ### Constraints **This problem uses bundled testdata.** $$ \def\arraystretch{1.5} \begin{array}{|c|c|c|c|c|c|c|}\hline \textbf{Subtask} & \textbf{\textsf{分值}} & \bm{T\le } & \bm{x\le} & \bm{y\le} & \bm{z\le} & \textbf{Subtask \textsf{依赖}}\cr\hline 1 & 20 & 1 & 10 & 10 & 10 &-\cr\hline 2 & 30 & 10 & 10^3 & 10^6 & 10^3 &1\cr\hline 3 & 20 & 100 & 10^6 & 10^9 & 10^6 &2\cr\hline 4 & 30 & 1000 & 10^9 & 5 \times10^{17} & 10^9 &3\cr\hline \end{array} $$ For $100\%$ of the data, it is guaranteed that $1 \le T \leq 1000$, $1 \leq x, z \leq 10^9$, $1 \leq y \leq 5 \times 10^{17}$。 Translated by ChatGPT 5