#include <bits/stdc++.h>
using namespace std;
bool prime(int n) {
  if (n < 2 || (n & 1) ^ 1) return false;
  for (int i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  string a = "FastestFinger";
  string b = "Ashishgup";
  while (t--) {
    int n;
    cin >> n;
    cout << ((n == 1 || ((n > 2 && (n & 1) ^ 1) &&
                         ((n & (n - 1)) == 0 || (prime(n / 2) && n % 4))))
                 ? a
                 : b)
         << "\n";
  }
}
