#include <bits/stdc++.h>
using namespace std;
bool pr(long long x) {
  for (long long i = 2; i * i <= x; ++i)
    if (x % i == 0) return false;
  return true;
}
bool f() {
  long long x;
  cin >> x;
  if (x == 1) return false;
  if (x == 2) return true;
  if (x % 2) return true;
  int num = 0;
  while (x % 2 == 0) {
    x /= 2;
    ++num;
  }
  if (x == 1) return false;
  if (num == 1 && pr(x)) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) cout << (f() ? "Ashishgup" : "FastestFinger") << "\n";
  return 0;
}
