#include <bits/stdc++.h>
using namespace std;
const int N = 10e5;
long long t, x, y, k, tmp, l, r, n, m;
string str;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n;
    if (n % 2) {
      if (n > 1)
        cout << "Ashishgup" << endl;
      else {
        cout << "FastestFinger" << endl;
      }
    } else {
      long long count = 0;
      while (n % 2 == 0) {
        n /= 2;
        count++;
      }
      if (n == 1) {
        if (count > 1)
          cout << "FastestFinger" << endl;
        else {
          cout << "Ashishgup" << endl;
        }
      } else {
        if (count > 1) {
          cout << "Ashishgup" << endl;
        } else {
          bool prime = true;
          for (long long f = 2; f * f <= n; f++) {
            if (n % f == 0) prime = false;
          }
          if (prime)
            cout << "FastestFinger" << endl;
          else {
            cout << "Ashishgup" << endl;
          }
        }
      }
    }
  }
}
