#include<map>
#include<queue>
#include<time.h>
#include<limits.h>
#include<cmath>
#include<ostream>
#include<iterator>
#include<set>
#include<stack>
#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
#define rep_1(i,m,n) for(int i=m;i<=n;i++)
#define mem(st) memset(st,0,sizeof st)
int read()
{
int res=0,ch,flag=0;
if((ch=getchar())=='-') //判断正负
flag=1;
else if(ch>='0'&&ch<='9') //得到完整的数
res=ch-'0';
while((ch=getchar())>='0'&&ch<='9')
res=res*10+ch-'0';
return flag?-res:res;
}
typedef long long ll;
typedef pair<int,int> pii;
typedef unsigned long long ull;
typedef pair<double,double> pdd;
const int inf = 0x3f3f3f3f;
bool isprime(int n)
{
for (int i = 2; i * i <= n; i ++)
if (n % i == 0) return false;
return true;
}
void work()
{
int n = read();
int ans; // 0 必败, 1 必胜
if (n == 1)
ans = 0;
else if (n == 2)
ans = 1;
else if (n & 1)//奇数必败
ans = 1;
else
{
int cnt = 0;
while (n % 2 == 0) n /= 2, cnt ++;
if (n == 1)
ans = 0;//2的整数次幂 ,就必败
//不是 2的整数次幂
else if (cnt == 1 && isprime(n))
ans = 0;//一个2和一个质数相乘 ,只能除n,然后必败
//或者 n不是质数
//那么 n 就是两个奇数的乘积
else
ans = 1;//
}
puts(ans == 0 ? "FastestFinger" : "Ashishgup");
}
int main()
{
int T = read();
while (T --) work();
return 0;
}