#include <bits/stdc++.h>
using namespace std;
int t, n;
bool calc(int x) {
  for (int i = 2; i < min(x, 50000); i++)
    if (x % i == 0) return false;
  return true;
}
int main() {
  cin >> t;
  for (int i = 1; i <= t; i++) {
    bool a = false;
    cin >> n;
    if (n == 1) a = true;
    if (n > 2 && n % 2 == 0) {
      if ((n & (n - 1)) == 0)
        a = true;
      else if (calc(n / 2) && n % 4 != 0)
        a = true;
    }
    if (a)
      cout << "FastestFinger" << endl;
    else
      cout << "Ashishgup" << endl;
  }
  return 0;
}
