#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int T;
  for (cin >> T; T; --T) {
    int n;
    cin >> n;
    bool p1Wins;
    if (n & 1) {
      p1Wins = (n != 1);
    } else {
      int div2 = 0;
      while (!(n & 1)) {
        div2++;
        n >>= 1;
      }
      if (div2 > 1 && n != 1) {
        p1Wins = true;
      } else if (div2 == 1 && n == 1) {
        p1Wins = true;
      } else {
        int raiz = sqrt(n);
        bool esPrimo = true;
        for (int i = 3; i <= raiz; i += 2) {
          if (!(n % i)) {
            esPrimo = false;
            break;
          }
        }
        p1Wins = !esPrimo;
      }
    }
    cout << (p1Wins ? "Ashishgup" : "FastestFinger") << "\n";
  }
  return 0;
}
