#include <bits/stdc++.h>
using namespace std;
const long long int MAX = 10000000;
const long long int mod = 1000000007;
long long int power(long long int a, long long int b, long long int m) {
  if (b == 0) return 1;
  if (b == 1) return a % m;
  long long int t = power(a, b / 2, m);
  t = (t * t) % m;
  if (b & 1) t = (t * a) % m;
  return t;
}
long long int countSetBits(long long int n) {
  long long int count = 0;
  while (n) {
    count += n & 1;
    n >>= 1;
  }
  return count;
}
long long int modInverse(long long int a, long long int m) {
  return power(a, m - 2, m);
}
long long int gcd(long long int a, long long int b) {
  if (!a) return b;
  return gcd(b % a, a);
}
bool prime[MAX];
void sieve() {
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = false;
  for (long long int p = 2; p * p <= MAX; p++) {
    if (prime[p] == true) {
      for (long long int i = p * 2; i <= MAX; i += p) prime[i] = false;
    }
  }
}
bool is_prime(long long int n) {
  if (n == 1) {
    return false;
  }
  long long int i = 2;
  while (i * i <= n) {
    if (n % i == 0) {
      return false;
    }
    i += 1;
  }
  return true;
}
bool cmp(pair<long long int, long long int> x,
         pair<long long int, long long int> y) {
  if (x.second == y.second) {
    return x.first < y.first;
  }
  return x.second < y.second;
}
bool cmp(const pair<int, int> x, const pair<int, int> y) {
  return (x.second - x.first) != (y.second - y.first);
}
void solve() {
  long long int n;
  cin >> n;
  string a = "Ashishgup", b = "FastestFinger";
  if (n == 1)
    cout << b;
  else if (n % 2 || is_prime(n))
    cout << a;
  else {
    long long int k = 0;
    while (n % 2 == 0) {
      n /= 2;
      k++;
    }
    if (n == 1)
      cout << b;
    else {
      if (is_prime(n)) {
        if (k == 1)
          cout << b;
        else
          cout << a;
      } else
        cout << a;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
    cout << endl;
  }
  return 0;
}
