In CycleLand Jack and Jelly are two friends. They want to go CycleSchool by a cycle ( Assume that they live in same house). Distance between CycleSchool and their house is 'N' km. Jack and Jelly both like their classmate Jenny. They decided to play a game such that the winner will get a chance to sit with Jenny in school. Rules of game are as follows:
- Initially Jelly will ride cycle.
- They will ride cycle one by one.
- When one is riding cycle other will sit on the carrier of cycle.
- In each ride they can ride cycle exactly 1, 2 or 4 km. One cannot ride more than remaining distance.
- One who reaches school riding cycle will get a chance to sit with Jenny.
Both play optimally. You have to find who will win this game.
First line of input contains an integer 'T' denoting the number of test cases. Then 'T' test cases follow. Each test case consists of a single line containing an integer N.
Print the name of winner i.e 'JACK' or 'JELLY'.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.