#include <bits/stdc++.h>
using namespace std;
bool isPrime(long n) {
  long i = 2;
  while (i <= floor(sqrt(n))) {
    if (n % i == 0) break;
    ++i;
  }
  if (i == floor(sqrt(n)) + 1)
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1 || (floor(log2(n)) == log2(n) && n != 2) ||
        (n != 2 && n % 2 == 0 && isPrime(n / 2)))
      cout << "FastestFinger\n";
    else
      cout << "Ashishgup\n";
  }
  return 0;
}
