#include <bits/stdc++.h>
using namespace std;
int main() {
  string a = "Ashishgup";
  string b = "FastestFinger";
  int t;
  cin >> t;
  while (t--) {
    int n;
    cin >> n;
    if (n == 1)
      cout << b << endl;
    else if (n == 2)
      cout << a << endl;
    else if (n % 2 == 1)
      cout << a << endl;
    else {
      int cnt = 0;
      while (n % 2 == 0) {
        cnt++;
        n /= 2;
      }
      if (cnt > 1) {
        if (n == 1)
          cout << b << endl;
        else
          cout << a << endl;
      } else if (cnt == 1) {
        bool flag = false;
        for (int i = 3; i * i <= n; i += 2)
          if (n % i == 0) {
            flag = true;
            break;
          }
        if (flag)
          cout << a << endl;
        else
          cout << b << endl;
      }
    }
  }
}
