#include <bits/stdc++.h>
using namespace std;
bool is_not_prime(long long int n) {
  long long int root, j;
  root = sqrt(n) + 1;
  for (j = 2; j <= root; j++) {
    if (n % j == 0) {
      return true;
    }
  }
  return false;
}
int main() {
  long long int n, t, i;
  cin >> t;
  while (t--) {
    cin >> n;
    if (n == 1) {
      cout << "FastestFinger" << endl;
    } else if (n == 2) {
      cout << "Ashishgup" << endl;
    } else if (n % 2 == 1) {
      cout << "Ashishgup" << endl;
    } else if (ceil(log2(n)) == floor(log2(n))) {
      cout << "FastestFinger" << endl;
    } else {
      n /= 2;
      if (is_not_prime(n)) {
        cout << "Ashishgup" << endl;
      } else {
        cout << "FastestFinger" << endl;
      }
    }
  }
  return 0;
}
