#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
bool isPrime(int n) {
  for (int i = 2; i * i <= n; ++i) {
    if (n % i == 0) return false;
  }
  return true;
}
int f(int n) {
  if (n == 1) return 0;
  if (n == 2) return 1;
  if (n % 2) return 1;
  if (n % 4) return !isPrime(n / 2);
  while (n % 2 == 0) n /= 2;
  return n == 1 ? 0 : 1;
}
void solve(int n) {
  if (f(n)) {
    cout << "Ashishgup\n";
  } else {
    cout << "FastestFinger\n";
  }
}
int main() {
  int t;
  cin >> t;
  for (int i = 0; i < t; ++i) {
    int n;
    cin >> n;
    solve(n);
  }
  return 0;
}
