#include <bits/stdc++.h>
using namespace std;
void player(int n) {
  if (n == 1)
    cout << "Ashishgup" << endl;
  else if (n == 2)
    cout << "FastestFinger" << endl;
}
bool isprime(int n) {
  for (int i = 2; i <= sqrt(n); i++)
    if (n % i == 0) return false;
  return true;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1)
      player(2);
    else if (n == 2)
      player(1);
    else if (n % 2 == 1)
      player(1);
    else if (n % 2 == 0) {
      n /= 2;
      if (n % 2 == 1 && isprime(n))
        player(2);
      else if (n % 2 == 1)
        player(1);
      else {
        while (n % 2 == 0) n /= 2;
        if (n == 1)
          player(2);
        else
          player(1);
      }
    }
  }
}
