#include <bits/stdc++.h>
using namespace std;
void ansf() {
  cout << "FastestFinger"
       << "\n";
  return;
}
void ansa() {
  cout << "Ashishgup"
       << "\n";
  return;
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
void solve() {
  long long int n;
  cin >> n;
  if (n == 1) {
    ansf();
    return;
  } else if (n <= 3) {
    ansa();
    return;
  } else if (n % 2 == 1) {
    ansa();
  } else {
    int two = 0;
    while (n % 2 == 0) {
      two++;
      n /= 2;
    }
    if (n == 1) {
      ansf();
    } else {
      if (two == 1 and isPrime(n)) {
        ansf();
      } else {
        ansa();
      }
    }
  }
  return;
}
void test() {
  int t;
  cin >> t;
  while (t--) solve();
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  test();
  return 0;
}
