#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() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int t, a, i;
  set<int> s;
  int mul = 2;
  for (i = 0; i < 29; i++) {
    s.insert(mul);
    mul *= 2;
  }
  cin >> t;
  while (t--) {
    cin >> a;
    if ((a % 2 != 0 && a != 1) || a == 2) {
      cout << "Ashishgup"
           << "\n";
      continue;
    } else if (a == 1) {
      cout << "FastestFinger"
           << "\n";
      continue;
    }
    if (s.count(a) == 1) {
      cout << "FastestFinger"
           << "\n";
    } else {
      for (i = 0; i < 2; i++) {
        if (a % 2 != 0) {
          break;
        } else {
          a = a / 2;
        }
      }
      if (i == 2) {
        cout << "Ashishgup"
             << "\n";
      } else {
        if (isPrime(a)) {
          cout << "FastestFinger"
               << "\n";
        } else {
          cout << "Ashishgup"
               << "\n";
        }
      }
    }
  }
}
