Codeforces Round 651 (Div. 2)
C
Number Game
Codeforces
1400
原题
← BD →
翻译中…

Ashishgup and FastestFinger play a game.

翻译中…

They start with a number $n$ and play in turns. In each turn, a player can make any one of the following moves:

翻译中…
  • Divide $n$ by any of its odd divisors greater than $1$.
  • Subtract $1$ from $n$ if $n$ is greater than $1$.
翻译中…

Divisors of a number include the number itself.

翻译中…

The player who is unable to make a move loses the game.

翻译中…

Ashishgup moves first. Determine the winner of the game if both of them play optimally.

翻译中…

Input

翻译中…

The first line contains a single integer $t$ ($1 \leq t \leq 100$)  — the number of test cases. The description of the test cases follows.

翻译中…

The only line of each test case contains a single integer  — $n$ ($1 \leq n \leq 10^9$).

翻译中…

Output

翻译中…

For each test case, print "Ashishgup" if he wins, and "FastestFinger" otherwise (without quotes).

翻译中…

Note

翻译中…

In the first test case, $n = 1$, Ashishgup cannot make a move. He loses.

翻译中…

In the second test case, $n = 2$, Ashishgup subtracts $1$ on the first move. Now $n = 1$, FastestFinger cannot make a move, so he loses.

翻译中…

In the third test case, $n = 3$, Ashishgup divides by $3$ on the first move. Now $n = 1$, FastestFinger cannot make a move, so he loses.

翻译中…

In the last test case, $n = 12$, Ashishgup divides it by $3$. Now $n = 4$, FastestFinger is forced to subtract $1$, and Ashishgup gets $3$, so he wins by dividing it by $3$.

翻译中…

样例

Input #1
7
1
2
3
4
5
6
12
Output #1
FastestFinger
Ashishgup
Ashishgup
FastestFinger
Ashishgup
FastestFinger
Ashishgup
InputCopy OutputCopy
题目信息
题号
1370C
时间限制
2 s
内存限制
256 MB
标签
博弈论
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。