#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t > 0) {
    int n;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n == 2 || n == 3 || n == 5 || n == 7 || n == 9)
      cout << "Ashishgup" << endl;
    else if (n == 4 || n == 6 || n == 8)
      cout << "FastestFinger" << endl;
    else if (n % 2 != 0)
      cout << "Ashishgup" << endl;
    else {
      int m = n;
      while (m % 2 == 0) {
        m = m / 2;
      }
      if (m == 1)
        cout << "FastestFinger" << endl;
      else {
        int i = 2, c = 0;
        int a = n;
        while (i * i <= n) {
          if (n % i == 0) {
            c = c + 2;
            if (c > 2) break;
          }
          i++;
        }
        if (c > 2)
          cout << "Ashishgup" << endl;
        else
          cout << "FastestFinger" << endl;
      }
    }
    t--;
  }
  return 0;
}
