#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
inline void solve() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << "FastestFinger\n";
    return;
  }
  if (n == 2) {
    cout << "Ashishgup\n";
    return;
  }
  if (n % 2 == 1) {
    cout << "Ashishgup\n";
    return;
  }
  long long cnt = 0;
  while (n % 2 == 0) n /= 2, cnt++;
  if (n == 1)
    cout << "FastestFinger\n";
  else if (cnt == 1) {
    long long sq = floor(sqrt(n));
    long long cnt2 = 0;
    for (long long i = 2; i <= sq; i++)
      if (n % i == 0) {
        cnt2 = 1;
        break;
      }
    if (cnt2 > 0)
      cout << "Ashishgup\n";
    else
      cout << "FastestFinger\n";
  } else
    cout << "Ashishgup\n";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long T;
  cin >> T;
  while (T--) solve();
  return 0;
}
