#include <bits/stdc++.h>
using namespace std;
long long t, n;
int main() {
  cin >> t;
  while (t-- > 0) {
    cin >> n;
    if (n == 1) {
      cout << "FastestFinger\n";
    } else if (n == 2) {
      cout << "Ashishgup\n";
    } else if (n % 2 != 0) {
      cout << "Ashishgup\n";
    } else if (n % 2 == 0) {
      long long ans = 1, sum = 0;
      for (long long i = 2; i * i <= n; i++) {
        if (n % i == 0) {
          if (i % 2 == 0) {
            while (n % i == 0) {
              n = n / i;
              ans *= i;
            }
          } else {
            while (n % i == 0) {
              n = n / i;
              sum++;
            }
          }
        }
      }
      if (n > 1) {
        if (n % 2 == 0) {
          ans *= n;
        } else {
          sum++;
        }
      }
      if (ans == 2 && sum >= 2) {
        cout << "Ashishgup\n";
      } else if (ans != 2 && sum >= 1) {
        cout << "Ashishgup\n";
      } else if (ans == 2 && sum <= 1) {
        cout << "FastestFinger\n";
      } else if (ans != 2 && sum <= 0) {
        cout << "FastestFinger\n";
      }
    }
  }
  return 0;
}
