The Game of Nuts

3.3

19 votes
Problem

Shekhar and his friend Nilesh are playing some unusual game. Initially there are two stacks of nuts. The first stack contains A nuts and the second contains B nuts. A player's move consists of two steps:

  • Choose one of the stacks from the two and eat it.

  • Split the other of the stacks into two new stacks. If a player can't split the other stack into two stacks he loses (if stack contains only 1 nut).

Shekhar starts the game. Tell who wins if both players play optimally.

Input

The first line of the input contains an integer T, the number of test cases.

The next T lines contain 2 space - separated integers A and B for the current test case.

Output

For every test case, output a single line having the word "Shekhar" or "Nilesh" (without quotes) depending upon who is the winner of this test case.

Constraints

  • 1 ≤ T ≤ 1000
  • 1 ≤ A, B ≤ 10000
  • Subtask #0[10 points]: Sample
  • Subtask #1[16 points]: 1 ≤ A, B ≤ 10
  • Subtask #2[30 points]: 1 ≤ A, B ≤ 100
  • Subtask #3[44 points]: 1 ≤ A, B ≤ 10000
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

In the first test case Shekhar can't finish even the first move, so Nilesh wins.

In the second test case Shekhar eats the first stack (with 1 nut), then splits the second stack (with 2 nuts) into two stacks, and Nilesh loses.

Editor Image

?