#include <bits/stdc++.h>
using namespace std;
int t, n;
int getMaxOddDiv(int n) {
  while (n > 1) {
    if (n % 2 == 1) {
      break;
    }
    n /= 2;
  }
  return n;
}
bool isPrime(int n) {
  bool flag = true;
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      flag = false;
      break;
    }
  }
  return flag;
}
int main() {
  cin >> t;
  while (t--) {
    cin >> n;
    bool flag = true;
    if (n == 1) {
      flag = true;
    } else if (n % 2 == 1 || n == 2) {
      flag = false;
    } else {
      int tmp = getMaxOddDiv(n);
      if (tmp == 1) {
        flag = true;
      } else if (n / tmp == 2) {
        flag = isPrime(tmp);
      } else {
        flag = false;
      }
    }
    cout << (flag ? "FastestFinger" : "Ashishgup") << endl;
  }
  return 0;
}
