#include <bits/stdc++.h>
using namespace std;
long long brr[500000];
long long arr[500000];
map<int, int> mm;
map<long long, long long> mmm;
vector<int> v;
vector<long long> vv;
bool check(int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  cout << fixed << setprecision(15);
  long long n, k;
  cin >> k;
  while (k--) {
    cin >> n;
    int lose = 0;
    if (n == 1) lose = 1;
    if (n > 2 and n % 2 == 0) {
      if ((n & (n - 1)) == 0) {
        lose = 1;
      }
      if (n % 4 != 0 and check(n / 2)) {
        lose = 1;
      }
    }
    if (lose) {
      cout << "FastestFinger" << endl;
    } else {
      cout << "Ashishgup" << endl;
    }
  }
}
