#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  while (T--) {
    int n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n & 1 || n == 2)
      cout << "Ashishgup" << endl;
    else {
      int cntTwo = 0;
      while (n % 2 == 0) cntTwo++, n >>= 1;
      int cnt = 0;
      for (int i = 3; i * i <= n; i += 2) {
        while (n % i == 0) cnt++, n /= i;
      }
      if (n != 1) cnt++;
      if (cnt >= 2 || cnt == 1 && cntTwo >= 2)
        cout << "Ashishgup" << endl;
      else
        cout << "FastestFinger" << endl;
    }
  }
  return 0;
}
