#include <bits/stdc++.h>
using namespace std;
vector<int> fact(int n) {
  vector<int> v;
  for (int i = 3; i * i <= n; i++) {
    if (n % i == 0) {
      if (i & 1) v.push_back(i);
      int d = n / i;
      if (d & 1 && i * i != n) v.push_back(d);
    }
  }
  return v;
}
int main() {
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n == 1) {
      cout << "FastestFinger" << endl;
      continue;
    }
    if (n & 1 || n == 2) {
      cout << "Ashishgup" << endl;
      continue;
    }
    vector<int> v;
    v = fact(n);
    sort(v.begin(), v.end());
    reverse(v.begin(), v.end());
    int cnt = 0;
    while (!v.empty()) {
      n /= v[0];
      v = fact(n);
      cnt += 1;
    }
    if ((n == 2 && cnt & 1) || (n > 2 && !(cnt & 1)))
      cout << "FastestFinger" << endl;
    if ((n == 2 && !(cnt & 1)) || (n > 2 && cnt & 1))
      cout << "Ashishgup" << endl;
  }
  return 0;
}
