#include <bits/stdc++.h>
using namespace std;
using ll = long long;
string solve() {
  const string p1 = "Ashishgup";
  const string p2 = "FastestFinger";
  int n;
  cin >> n;
  if (n == 1) return p2;
  if (n == 2) return p1;
  if (n % 2 == 1) return p1;
  int p = 1;
  while (p < n) {
    p *= 2;
  }
  if (p == n) return p2;
  n /= 2;
  for (int d = 2; d * d <= n && d < n; ++d) {
    if (n % d == 0) return p1;
  }
  return p2;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int nbTests;
  cin >> nbTests;
  for (int iTest = 0; iTest < nbTests; ++iTest) {
    cout << solve() << "\n";
  }
}
