#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tests = 1;
  cin >> tests;
  while (tests--) {
    long long int n;
    cin >> n;
    if (n % 2) {
      if (n == 1)
        cout << "FastestFinger" << endl;
      else
        cout << "Ashishgup" << endl;
      continue;
    }
    if (n == 2) {
      cout << "Ashishgup" << endl;
      continue;
    }
    long long int k = n / 2;
    long long int m = n;
    bool f = 0, p = 0;
    for (long long int i = 2; i * i <= n; i++) {
      while (n % i == 0) {
        if (i % 2) {
          f = 1;
          long long int l = (m / i) % 2;
          if (l == 0 && m / i > 2) p = 1;
        }
        n /= i;
      }
    }
    if (n != 1 && n % 2) {
      f = 1;
      long long int l = (m / n) % 2;
      if (l == 0 && m / n > 2) p = 1;
    }
    if (p)
      cout << "Ashishgup" << endl;
    else
      cout << "FastestFinger" << endl;
  }
  return 0;
}
