Magic of Sir Jadeja
Practice
3.8 (174 votes)
Ready
Mathematics
Approved
Easy Medium
Problem
10% Success 3656 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Team India is playing too much cricket in this season. Team players are getting better in their performance with match by match. Sir Jadeja has become a Trump Card for M.S Dhoni. There is a hidden reason of his special position in the team. He can make new copies of a person by some magic. Due to this, players can get many chances to bat. Now there is a fixed batting line up of top 7 batsman decided by Dhoni as : [ "Rohit", "Dhawan", "Kohli", "Yuvraj", "Raina" , "Dhoni", "Sir Jadeja"]. Now they are playing one ball at a time and once they play a ball, Jadeja will make a new copy of that player (including himself) and both the same players will get back in this batting line up. In this way they will get a chance to play a ball turn by turn. Your task is very simple. You are required to output the name of a player as given in the above list who will play a Kth ball.

Input

  • First line will contain T (No. of test cases).
  • Each test case will consist of one line containing the value of K .

Output

  • For every test case, print a new line having the name of a player who will play the Kth ball.

Constraints

  • 1 ≤ T ≤ 1000
  • 1 ≤ K ≤ 109

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
Points:20
34 votes
Tags:
AlgorithmsApprovedEasyGreedy AlgorithmsOpen
Points:20
18 votes
Tags:
Hash tableData StructuresEasyOpenApprovedHash function
Points:20
63 votes
Tags:
ApprovedBasic ProgrammingEasyMathOpen