#include <bits/stdc++.h>
using namespace std;
int main() {
  long long i, j, k, n, m, t, l, g, f;
  cin >> t;
  while (t--) {
    cin >> n;
    g = n;
    k = 0;
    if (n == 1) {
      k++;
    } else if (n % 2 == 1 || n == 2) {
    } else {
      j = log2(n);
      j = pow(2, j) + 0.5;
      if (j == n) {
        k++;
      } else {
        j = n / 2;
        if (j % 2 == 1) {
          f = 0;
          for (i = 2; i * i <= j; i++) {
            if (j % i == 0) {
              m = j / i;
              if (i % 2 == 1 && m % 2 == 1) {
                f = 1;
                break;
              }
            }
          }
          if (f == 0) k++;
        } else {
        }
      }
    }
    if (k % 2 == 0)
      cout << "Ashishgup"
           << "\n";
    else
      cout << "FastestFinger"
           << "\n";
  }
  return 0;
}
