This page is still under construction.

Parts of this page are still being built. What you see may change.

Boring Game

Time limit4sMemory limit512 MB

Summary
Decide the winner of a coin-flipping game on a huge N by N board where each move flips a rectangle whose bottom-right corner is heads, with heads cells given as a union of M rectangles.
Level

Hard8 of 10

Topics
Game theory, Combinatorics, Math, Geometry
Solved
No attempts yet

Problem

Yong Chol is playing a game with his brother. The game board is an N×NN \times N grid. Each cell of the grid contains a coin. Each coin is either heads up or tails up. The players take turns flipping coins. In each turn, the player selects a cell (x,y)(x, y) (1≤x,y≤N1 \le x, y \le N) with a coin heads up, and also two integers ww and hh (1≤w≤x1 \le w \le x, 1≤h≤y1 \le h \le y). After that, the player looks at the rectangle of cells with its opposite corners containing cells (x−w+1,y−h+1)(x - w + 1, y - h + 1) and (x,y)(x, y), and flips all coins in this rectangle, changing heads to tails and vice versa.

The player who cannot make a move loses the game.

The game with his little brother is so boring for Yong Chol that he wants to finish it immediately. But before doing that, Yong Chol wants to know who will win if the two players play optimally from now on. The board may be rather large, so its current state is given as a list of rectangles such that their union represents the cells with a coin heads up, and all other cells contain a coin tails up. Yong Chol is to take the next move. Can you help him find out who will win?

Input

The first line of input contains an integer TT, the number of test cases (1≤T≤2001 \le T \le 200).

Each test case starts with a line containing two integers: NN, the size of the board, and MM, the number of rectangles (1≤N≤1091 \le N \le 10^9, 1≤M≤1051 \le M \le 10^5).

Each of the next MM lines contains four integers x1x_1, y1y_1, x2x_2, and y2y_2: the coordinates of the two opposite corners of the rectangle (1≤xi,yi≤N1 \le x_i, y_i \le N, x1≤x2x_1 \le x_2, y1≤y2y_1 \le y_2).

The total sum of MM over all test cases will not exceed 6⋅1056 \cdot 10^5. For at least 9090 percent of the test cases, MM will be smaller than 600600.

Output

For each test case, if Yong Chol wins the game, print "Yong Chol", otherwise print "Brother".

Examples1

  1. Example 1

    Input
    2
    3 2
    1 2 1 3
    2 1 3 1
    2 1
    1 1 2 2
    
    Expected output
    Brother
    Yong Chol