#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n;
  cin >> n;
  if (n == 1)
    printf("FastestFinger\n");
  else if (n == 2 || n % 2 == 1)
    printf("Ashishgup\n");
  else {
    int flag = 0;
    while (n % 2 == 0) {
      n /= 2;
      flag++;
    }
    if (n == 1)
      printf("FastestFinger\n");
    else {
      int s = 0;
      for (int i = 3; i <= sqrt(n); i += 2)
        while (n % i == 0) {
          n /= i;
          s++;
          if (s > 1) break;
        }
      if (flag == 1) {
        if (s == 0)
          printf("FastestFinger\n");
        else
          printf("Ashishgup\n");
      } else
        printf("Ashishgup\n");
    }
  }
}
int main() {
  ios::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) solve();
}
