#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << "FastestFinger" << endl;
    return;
  }
  if ((n & 1) || (n == 2)) {
    cout << "Ashishgup" << endl;
    return;
  } else {
    long long f = 0;
    for (long long i = 2; i <= sqrt(n); i++) {
      if (n % i == 0 and i % 2 == 1) {
        if (n / i > 2) {
          f = 1;
          break;
        }
      }
      if (n % i == 0 and (n / i) % 2 == 1) {
        if (i > 2) {
          f = 1;
          break;
        }
      }
    }
    if (f == 1) {
      cout << "Ashishgup" << endl;
    } else {
      cout << "FastestFinger" << endl;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long q;
  cin >> q;
  while (q--) {
    solve();
  }
  return 0;
}
