#include <bits/stdc++.h>
using namespace std;
long long int power(long long int n) {
  long long int ans = 0;
  while (n % 2 == 0) {
    ans++;
    n /= 2;
  }
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int n;
    cin >> n;
    string ans = "Ashishgup";
    if (n == 1)
      ans = "FastestFinger";
    else if (n & 1)
      ans = "Ashishgup";
    else if (n > 2) {
      long long int two = power(n);
      if ((1 << two) == n)
        ans = "FastestFinger";
      else if (two != 1)
        ans = "Ashishgup";
      else {
        ans = "FastestFinger";
        n /= (1 << two);
        long long int sq = sqrt(n);
        for (long long int i = 3; i <= sq; i += 2) {
          if (n % i == 0) {
            ans = "Ashishgup";
            break;
          }
        }
      }
    }
    cout << ans << endl;
  }
}
