#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() {
  int t;
  cin >> t;
  while (t--) {
    int n, count = 0;
    cin >> n;
    if (n > 1 && n % 2 != 0 || n == 2)
      cout << "Ashishgup" << endl;
    else {
      if (ceil(log2(n)) == floor(log2(n)))
        cout << "FastestFinger" << endl;
      else if (n % 4 == 0)
        cout << "Ashishgup" << endl;
      else {
        n = n / 2;
        if (isprime(n))
          cout << "FastestFinger" << endl;
        else
          cout << "Ashishgup" << endl;
      }
    }
  }
  return 0;
}
