#include <bits/stdc++.h>
using namespace std;
int prime(int n) {
  int i;
  for (i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  return 1;
}
int main() {
  long long int n, k, t, i, j, r, w, l, l1, o, cnt5, sum, cnt, cnt2, b, flag,
      flag1, sum1, cnt1, m, cnt4;
  cin >> t;
  for (i = 1; i <= t; i++) {
    cin >> n;
    flag = n;
    cnt1 = n;
    if (n == 1) {
      cout << "FastestFinger" << endl;
    } else if (n == 2) {
      cout << "Ashishgup" << endl;
    } else if (n % 2 == 1) {
      cout << "Ashishgup" << endl;
    } else {
      cnt = 0;
      while (n % 2 == 0) {
        n = n / 2;
        cnt++;
      }
      if (cnt == 1) {
        if (prime(n) == 1) {
          cout << "FastestFinger" << endl;
        } else {
          cout << "Ashishgup" << endl;
        }
      } else {
        if (n == 1) {
          cout << "FastestFinger" << endl;
        } else {
          cout << "Ashishgup" << endl;
        }
      }
    }
  }
  return 0;
}
