#include <bits/stdc++.h>
using namespace std;
long long int T, n;
int main() {
  ios::sync_with_stdio(false);
  cin >> T;
  while (T--) {
    cin >> n;
    if (n == 1)
      cout << "FastestFinger\n";
    else if (n == 2)
      cout << "Ashishgup\n";
    else if (n % 2)
      cout << "Ashishgup\n";
    else {
      long long int c = 0, s = 1, m = n;
      for (long long int i = 2; i * i <= m; i++) {
        while (m % i == 0) {
          if (i % 2) c++, s *= i;
          m /= i;
        }
      }
      if (m != 1) {
        if (m % 2) c++, s *= m;
      }
      if (c == 0)
        cout << "FastestFinger\n";
      else if (n / s == 2) {
        if (c == 1)
          cout << "FastestFinger\n";
        else
          cout << "Ashishgup\n";
      } else
        cout << "Ashishgup\n";
      ;
    }
  }
}
