#include <bits/stdc++.h>
using namespace std;
long long int dx[] = {0, 0, 1, -1};
long long int dy[] = {1, -1, 0, 0};
long long int dxk[] = {0, 0, 1, -1, 1, 1, -1, -1};
long long int dyk[] = {1, -1, 0, 0, 1, -1, 1, -1};
const long long int inf = 1e+18;
const long long int mod = 1e+9 + 7;
void solve() {
  long long int n;
  cin >> n;
  if (n == 1) {
    cout << "FastestFinger" << '\n';
    return;
  }
  if (n % 2) {
    cout << "Ashishgup" << '\n';
    return;
  }
  if (n == 2) {
    cout << "Ashishgup" << '\n';
    return;
  }
  long long int m = n;
  while (m % 2 == 0) {
    m /= 2;
  }
  if ((n / 2) % 2 == 0) {
    if (m == 1) {
      cout << "FastestFinger" << '\n';
      return;
    } else {
      cout << "Ashishgup" << '\n';
      return;
    }
  }
  for (long long int i = 2; i * i <= m; i++) {
    if (m % i == 0) {
      cout << "Ashishgup" << '\n';
      return;
    }
  }
  cout << "FastestFinger" << '\n';
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int T;
  cin >> T;
  while (T--) solve();
  return 0;
}
