#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    long long int n, l, g = -1;
    cin >> n;
    if (n == 1 || n == 6 || (ceil(log2(n)) == floor(log2(n))) && n != 2)
      cout << "FastestFinger" << endl;
    else {
      if (n % 2 != 0 || n == 2 || (n % 2 == 0 && (n / 2) % 2 == 0))
        cout << "Ashishgup" << endl;
      else {
        int m = n / 2;
        for (int i = 2; i * i <= m; i++) {
          if ((m) % i == 0) {
            cout << "Ashishgup" << endl;
            g = 0;
            break;
          } else
            g = 1;
        }
        if (g == 1) cout << "FastestFinger" << endl;
      }
    }
  }
}
