Amir, believes in binary numbers. After solving lots of binary-boy problems, He managed to come up with a problem about binary numbers.
The problem is as follows :
Amir calls a number super binary number if it has at least two of the following properties :
Your job is to help Amir to determine if a number is a super binary number or not.
The first line of input shows the number of test cases $$$t$$$ :
$$$1 \le t \le 10^3$$$.
Each of following $$$t$$$ lines contains an integer $$$n$$$ :
$$$1 \le n \le 10^3$$$.
For each test case, if the number is a super binary number print "ghavi", otherwise print "fanni khordim".
3856917
ghavi fanni khordim ghavi
Testcase $$$1$$$ :
$$$85 = (1010101)_2 \rightarrow Palindrome$$$.
$$$85 = (55)_{16} \rightarrow Palindrome$$$.
Name |
---|