#include <bits/stdc++.h>
using namespace std;
template <class T>
void printArray(vector<T> arr) {
  for (T a : arr) cout << a << " ";
  cout << '\n';
}
void printVerdict(bool verdict) { cout << (verdict ? "YES" : "NO") << '\n'; }
bool isPrime(int n) {
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << '\n';
    else if (n == 2 || n & 1)
      cout << "Ashishgup" << '\n';
    else {
      if (__builtin_popcount(n) == 1)
        cout << "FastestFinger" << '\n';
      else {
        if (n % 4 == 0)
          cout << "Ashishgup" << '\n';
        else if (!isPrime(n / 2))
          cout << "Ashishgup" << '\n';
        else
          cout << "FastestFinger" << '\n';
      }
    }
  }
}
