#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
constexpr ll INF = 1e18;
constexpr int inf = 1e9;
constexpr ll mod = 1000000007;
constexpr ll mod2 = 998244353;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[8] = {1, 0, -1, 0, 1, 1, -1, -1};
const int dy[8] = {0, 1, 0, -1, 1, -1, 1, -1};
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int _;
  cin >> _;
  while (_--) {
    ll N;
    cin >> N;
    if (N == 1) {
      cout << "FastestFinger\n";
      continue;
    }
    if (N % 2 || N == 2) {
      cout << "Ashishgup\n";
      continue;
    }
    int cnt = 0;
    while (N % 2 == 0) {
      cnt++;
      N /= 2;
    }
    if (N == 1) {
      cout << "FastestFinger\n";
      continue;
    }
    if (cnt >= 2) {
      cout << "Ashishgup\n";
      continue;
    }
    bool ok = false;
    for (ll i = 2; i * i <= N; i++) {
      if (N % i == 0) {
        ok = true;
        break;
      }
    }
    if (ok) {
      cout << "Ashishgup\n";
    } else {
      cout << "FastestFinger\n";
    }
  }
  return 0;
}
