#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000007;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t = 1;
  cin >> t;
  string a = "Ashishgup";
  string f = "FastestFinger";
  while (t--) {
    int n;
    cin >> n;
    if (n == 1)
      cout << f << "\n";
    else if (n == 2)
      cout << a << "\n";
    else if (n % 2 == 0) {
      int z = n;
      while (z % 2 == 0) {
        z /= 2;
      }
      if (z != 1) {
        if (n % 4 == 0)
          cout << a << "\n";
        else {
          int ok = 0;
          for (int i = 3; i * i <= z; i++) {
            if (z % i == 0 && z / i > 1) {
              ok = 1;
              break;
            }
          }
          if (ok)
            cout << a << "\n";
          else
            cout << f << "\n";
        }
      } else {
        cout << f << "\n";
      }
    } else {
      cout << a << "\n";
    }
  }
  return 0;
}
