#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll MOD = 1000000007;
ll mod = 998244353;
int inf = 1000001000;
ll INF = 1e18 + 5;
int main() {
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);
  int t;
  cin >> t;
  for (int(_) = 0; (_) < (t); (_)++) {
    int n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n == 2)
      cout << "Ashishgup" << endl;
    else {
      if (n % 2)
        cout << "Ashishgup" << endl;
      else {
        int cnt = 0;
        while (n % 2 == 0) {
          n /= 2;
          cnt++;
        }
        if (n == 1) {
          cout << "FastestFinger" << endl;
        } else {
          if (cnt > 1)
            cout << "Ashishgup" << endl;
          else {
            int q = 0;
            for (ll i = 3; i * i <= n; i += 2) {
              if (n % i == 0) {
                cout << "Ashishgup" << endl;
                q++;
                break;
              }
            }
            if (q == 0) cout << "FastestFinger" << endl;
          }
        }
      }
    }
  }
}
