#include <bits/stdc++.h>
using namespace std;
int t, n;
bool has_odd_divisor(int n) {
  for (int i = 3; i < n; i += 2) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
bool isPrime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    if (n == 1) {
      cout << "FastestFinger\n";
      continue;
    }
    if (n % 2 == 0) {
      if (n == 2) {
        cout << "Ashishgup\n";
      } else if ((n & (n - 1)) == 0) {
        cout << "FastestFinger\n";
      } else {
        if (n % 4 == 0) {
          cout << "Ashishgup\n";
        } else {
          if (isPrime(n / 2)) {
            cout << "FastestFinger" << '\n';
          } else {
            cout << "Ashishgup\n";
          }
        }
      }
    } else {
      cout << "Ashishgup" << '\n';
    }
  }
}
