#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
bool power(long long int n) {
  if (n != 0 && (n & (n - 1)) == 0) {
    return true;
  } else {
    return false;
  }
}
bool isprime(long long int n) {
  if (n == 1) return false;
  long long int i = 2;
  while (i * i <= n) {
    if (n % i == 0) return false;
    i += 1;
  }
  return true;
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger\n";
    else if (n % 2 != 0 || n == 2)
      cout << "Ashishgup\n";
    else {
      if (power(n) || isprime(n / 2))
        cout << "FastestFinger\n";
      else
        cout << "Ashishgup\n";
    }
  }
  return 0;
}
