#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q != 0) {
    int n;
    cin >> n;
    int one = 0;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n == 2)
      cout << "Ashishgup" << endl;
    else if (n % 2 != 0)
      cout << "Ashishgup" << endl;
    else {
      int t = n;
      int count = 0, last = n;
      set<int> s;
      while (n != 1) {
        for (int i = 2; i <= sqrt(n); i++) {
          if ((n % i) == 0) {
            if (i % 2 != 0) {
              s.insert(i);
              count++;
            }
            n = (n / i);
          }
        }
        if (n == last) break;
        last = n;
      }
      if (n % 2 != 0) {
        s.insert(n);
        count++;
      }
      for (auto a : s) {
        t = (t / a);
      }
      if ((t == 2 && count != 1) || t == 1)
        cout << "Ashishgup" << endl;
      else if (t == 2 && count == 1)
        cout << "FastestFinger" << endl;
      else if (count != 0)
        cout << "Ashishgup" << endl;
      else
        cout << "FastestFinger" << endl;
    }
    q--;
  }
  return 0;
}
