Game of Stones
Practice
4.5 (2 votes)
Problem
22% Success 195 Attempts 50 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Cersei and Eddard have \(N\) piles of stones. Each pile consists of stones of two colors, black and white. Before starting the game and after observing the piles, Eddard can choose \(C\) as either white or black. In the game players make alternate moves, game starts with Cersei making a move. Whoever is unable to make a move, loses the game. A move can be defined as follows:

  • Choose a pile \(P\).
  • If \(P\) has a stone of color \(C\), remove a non-zero number of stones of color \(C\) from \(P\).
  • If \(P\) doesn't have stones of color \(C\), remove a non-zero number of stones from \(P\).

Since, when you play the game of stones, you win or you die, there will be only one survivor, Petyr wants to know the survivor's name in advance. Help Petyr by printing "Cersei" or "Eddard", depending on who will win the game if it is played optimally.

Input

First line will have the number of test cases \(t\).

First line of every test case will have the number of piles \(N\).

The following \(N\) lines for every test case will have 2 integers \(w[i]\) and \(b[i]\), denoting the number of white stones and the number of black stones for the \(i^{th}\) pile.

Output

Print "Cersei" or "Eddard" depending on who survives on a new line for every test case.

Constraints

\(1 \leq t \leq 100\)

\(1 \leq N \leq 1000\)

\(0 \leq w[i], b[i] \leq 10^{9} \forall 1 \leq i \leq N \)

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
No similar problems found