#include <bits/stdc++.h>
using namespace std;
const int N = 50000;
bool check_prime(int n) {
  for (int i = 2; i < min(N, n); i++)
    if (n % i == 0) return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    if (n == 1 || n == 4) {
      cout << "FastestFinger" << endl;
    } else if (n % 2 != 0) {
      cout << "Ashishgup" << endl;
    } else if (n == 2) {
      cout << "Ashishgup" << endl;
    } else if (((n) & (n - 1)) == 0) {
      cout << "FastestFinger" << endl;
    } else {
      if (check_prime(n / 2)) {
        cout << "FastestFinger" << endl;
      } else {
        cout << "Ashishgup" << endl;
      }
    }
  }
  return 0;
}
