#include <bits/stdc++.h>
using namespace std;
long long global = 0;
void test_case(long long);
int main() {
  clock_t begin, end;
  begin = clock();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  int yes = 1;
  if (yes)
    cin >> t;
  else
    t = 1;
  for (long long(T) = 0; (T) < t; (T)++) test_case(T);
  end = clock();
  return 0;
}
void test_case(long long T) {
  long long n;
  cin >> n;
  string b = "FastestFinger";
  string a = "Ashishgup";
  if (n == 1) {
    cout << b << endl;
    return;
  }
  if (n == 2) {
    cout << a << endl;
    return;
  }
  if (n % 2) {
    cout << a << endl;
    return;
  }
  long long p = 0;
  while (n % 2 == 0 && n > 1) {
    n /= 2;
    p++;
  }
  if (n == 1) {
    if (p == 1)
      cout << a << endl;
    else
      cout << b << endl;
  } else {
    long long lim = sqrt(n) + 1;
    for (long long j = 2; j < lim; j++) {
      if (n % j == 0) {
        cout << a << endl;
        return;
      }
    }
    if (p == 1)
      cout << b << endl;
    else
      cout << a << endl;
    return;
  }
}
