#include <bits/stdc++.h>
using namespace std;
bool is_prime(int p) {
  if (p == 1) {
    return false;
  }
  if (p == 2) {
    return true;
  }
  for (int i = 2; i * i <= p; ++i) {
    if (p % i == 0) {
      return false;
    }
  }
  return true;
}
const string s = "FastestFinger";
const string f = "Ashishgup";
void solve() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << s << endl;
    return;
  }
  if (n == 2) {
    cout << f << endl;
    return;
  }
  if (n % 2 == 1) {
    cout << f << endl;
    return;
  }
  int tot2 = 1;
  while (n % 2 == 0) {
    n /= 2;
    tot2 *= 2;
  }
  if (n == 1) {
    cout << s << endl;
    return;
  }
  if (tot2 == 2 && is_prime(n)) {
    cout << s << endl;
    return;
  }
  cout << f << endl;
}
int main() {
  int t;
  cin >> t;
  for (int tcase = 0; tcase < t; ++tcase) {
    solve();
  }
  return 0;
}
