#include <bits/stdc++.h>
using namespace std;
int main() {
  int t = 0;
  cin >> t;
  while (t--) {
    int n = 0;
    cin >> n;
    if (n == 1)
      cout << "FastestFinger" << endl;
    else if (n == 2 || (n & 1))
      cout << "Ashishgup" << endl;
    else {
      bool flag = true;
      for (int i = 2; i * i <= n && flag; ++i) {
        if (n % i) continue;
        if (((i & 1) && n / i != 2) || (((n / i) & 1) && i != 2)) flag = false;
      }
      if (flag)
        cout << "FastestFinger" << endl;
      else
        cout << "Ashishgup" << endl;
    }
  }
  return 0;
}
