#include <bits/stdc++.h>
using namespace std;
bool check(long long int n) {
  if (n == 2 || n % 2 == 1) return false;
  double m = log2(n);
  if (abs(m - (int)m) == 0) return true;
  long long int p = n / 2;
  for (long long int i = 2; i * i <= p; i++)
    if (p % i == 0) return false;
  return true;
}
int main() {
  long long int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n == 1 || check(n))
      cout << "FastestFinger";
    else
      cout << "Ashishgup";
    cout << endl;
  }
}
