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