#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t, n;
  cin >> t;
  while (t--) {
    cin >> n;
    map<int, int> mp;
    int m = n;
    for (int i = 2; i * i <= n; i++) {
      while (m % i == 0) {
        mp[i]++;
        m /= i;
      }
    }
    if (m > 1) mp[m]++;
    bool ok = false;
    int minn = 0x3f3f3f3f;
    for (auto it : mp) {
      if (it.first % 2 == 1) minn = min(minn, it.first);
    }
    if (n % 2 == 1) {
      if (n == 1)
        cout << "FastestFinger\n";
      else
        cout << "Ashishgup\n";
    } else {
      if (minn != 0x3f3f3f3f) {
        if (n / minn > 2 && (n / minn) % 2 == 0)
          cout << "Ashishgup\n";
        else
          cout << "FastestFinger\n";
      } else {
        if (n == 2)
          cout << "Ashishgup\n";
        else
          cout << "FastestFinger\n";
      }
    }
  }
  return 0;
}
