#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long n, nc;
    cin >> n;
    nc = n;
    if (n == 1) {
      cout << "FastestFinger\n";
    } else if (n % 2 == 1 || n == 2) {
      cout << "Ashishgup\n";
    } else {
      long long d = 2, event = 0, odd = 0;
      while (n > 1) {
        while (n % d == 0) {
          n = n / d;
          if (d == 2) {
            event++;
          } else {
            odd++;
          }
        }
        if ((event > 1 && odd > 0) || odd > 1) {
          break;
        }
        if (d == 2) {
          d++;
        } else {
          d += 2;
        }
        if (d > sqrt(n) && n > 2) {
          odd++;
          n = 1;
          break;
        }
      }
      if ((event > 1 && odd > 0) || odd > 1) {
        cout << "Ashishgup\n";
      } else {
        cout << "FastestFinger\n";
      }
    }
  }
}
