#include <bits/stdc++.h>
using namespace std;
void make_unique(vector<long long> vec) {
  sort((vec).begin(), (vec).end());
  vec.resize(unique((vec).begin(), (vec).end()) - vec.begin());
}
bool isPrime(int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  cin >> t;
  while (t--) {
    long long x, k, h, p, a, b, c, t, n, m, i, j, flag = 0, count = 0, move = 0;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << '\n';
    else if (n == 2)
      cout << "Ashishgup" << '\n';
    else if (n & 1)
      cout << "Ashishgup" << '\n';
    else {
      long long temp = n;
      while (temp % 2 == 0) {
        temp = temp / 2;
        count++;
      }
      bool prime = isPrime(temp);
      if (temp == 1 || (prime == true && count == 1))
        cout << "FastestFinger" << '\n';
      else
        cout << "Ashishgup" << '\n';
    }
  }
  return 0;
}
