PPR - Pizza Prize
Asad, Foyj, Juwel, Mijan, Tanmay are friends from group "Mission Starts". They are in the queue for pizza in a bakery. No other people is in the queue. A person who takes one pizza can get two chances to get pizza at the end of queue.
Explanation:
Initial Chances queue: Asad, Foyj, Juwel, Mijan, Tanmay.
After taking 1st pizza the Chances queue: Foyj, Juwel, Mijan, Tanmay, Asad, Asad.
After taking 2nd pizza the Chances queue: Juwel, Mijan, Tanmay, Asad, Asad, Foyj, Foyj.
And so on……..
But the shopkeeper wants to offer a special prize to a person who have the N th pizza. In this case, He asks for your help. You are a great programmer in our country. Your task is to find the name of the lucky winner who have the N th pizza (the queue only contain these 5 peoples and their order should be maintained strictly).
Input
Every line of the input contains a single integer N denoting the lucky pizza number.
Constraints
- 1 ≤ N ≤ 109
Output
For each test case, print a single line and print the name of the lucky winner.
Example
Input: 1 2 3 Output: Asad Foyj Juwel
hide comments
prateek_imkp1:
2018-06-24 17:57:03
Nice question . But please specify the input format . Last edit: 2018-06-26 11:33:12 |
|
syamphanindra:
2018-06-24 16:36:40
Hey input format is correct??
|
|
nadstratosfer:
2018-06-24 13:00:36
Nice one =) |
Added by: | asad_IT |
Date: | 2018-06-24 |
Time limit: | 0.5s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |
Resource: | Adhoc |