#include <bits/stdc++.h>
using namespace std;
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;
}
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n == 2)
      cout << "Ashishgup" << endl;
    else if ((n % 2) == 1)
      cout << "Ashishgup" << endl;
    else {
      long long x = n;
      while ((x % 2) == 0) x = x / 2;
      if (x == 1)
        cout << "FastestFinger" << endl;
      else if ((n / x) == 2) {
        if (isPrime(x)) {
          cout << "FastestFinger" << endl;
          continue;
        } else {
          cout << "Ashishgup" << endl;
        }
      } else
        cout << "Ashishgup" << endl;
    }
  }
}
