#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, a, b;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    long long int rem = -1;
    long long int flag = 0;
    cin >> n;
    if (n % 2 != 0) {
      if (n == 1)
        cout << "FastestFinger" << endl;
      else
        cout << "Ashishgup" << endl;
    } else {
      if (n == 2) {
        cout << "Ashishgup" << endl;
      } else {
        vector<long long int> od_devisor;
        for (long long int i = 2; i * i <= n; i++) {
          if (n % i == 0) {
            if ((n % i) == i && (i % 2 != 0)) {
              od_devisor.push_back(i);
            } else {
              if (i % 2 != 0) od_devisor.push_back(i);
              if ((n / i) % 2 != 0) od_devisor.push_back(n / i);
            }
          }
        }
        for (long long int j = 0; j < od_devisor.size(); j++) {
          rem = n / od_devisor[j];
          if (rem != 2) {
            flag = 1;
          }
        }
        if (flag == 0) {
          cout << "FastestFinger" << endl;
        } else {
          cout << "Ashishgup" << endl;
        }
      }
    }
  }
  return 0;
}
