#include <bits/stdc++.h>
using namespace std;
int infi = 1000000007;
bool check_prime(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_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    long long n;
    cin >> n;
    if (n == 1) {
      cout << "FastestFinger";
      cout << endl;
    } else if (n & 1 || n == 2) {
      cout << "Ashishgup";
      cout << endl;
    } else {
      if (!(n & (n - 1))) {
        cout << "FastestFinger";
        cout << endl;
      } else {
        int i = 4;
        bool flag = false;
        while (i < n) {
          if (n % i == 0) {
            flag = true;
          }
          i *= 2;
        }
        if (flag) {
          cout << "Ashishgup";
          cout << endl;
        } else {
          if (check_prime(n / 2)) {
            cout << "FastestFinger";
            cout << endl;
          } else {
            cout << "Ashishgup";
            cout << endl;
          }
        }
      }
    }
  }
}
