#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T;
  cin >> T;
  while (T--) {
    long long int n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n % 2 == 1 || n == 2)
      cout << "Ashishgup" << endl;
    else {
      int cnt2 = 0;
      while (n % 2 == 0) {
        n = n / 2;
        cnt2++;
      }
      int cnt = 0;
      for (int i = 3; i <= sqrt(n); i += 2) {
        while (n % i == 0) {
          cnt++;
          n = n / i;
        }
      }
      if (n > 2) cnt++;
      if (cnt2 <= 1) {
        if (cnt > 1)
          cout << "Ashishgup" << endl;
        else
          cout << "FastestFinger" << endl;
      } else if (cnt == 0)
        cout << "FastestFinger" << endl;
      else {
        cout << "Ashishgup" << endl;
      }
    }
  }
  return 0;
}
