#include <bits/stdc++.h>
using namespace std;
long long int arr[20009];
vector<long long int> vec, vec2;
int main() {
  long long int a, b, c, d, e, i, j, k, l, n, m, x, y, t, p;
  scanf("%lld", &t);
  for (p = 1; p <= t; p++) {
    scanf("%lld", &n);
    if (n == 1) {
      printf("FastestFinger\n");
    } else if (n == 2 || n % 2 == 1) {
      printf("Ashishgup\n");
    } else {
      a = 0;
      while (n % 2 == 0) {
        a++;
        n = n / 2;
      }
      if (n == 1) {
        printf("FastestFinger\n");
      } else {
        if (a > 1) {
          printf("Ashishgup\n");
        } else {
          m = sqrtl(n);
          c = 0;
          for (i = 2; i <= m; i++) {
            if (n % i == 0) {
              c = 1;
              break;
            }
          }
          if (c == 0) {
            printf("FastestFinger\n");
          } else {
            printf("Ashishgup\n");
          }
        }
      }
    }
  }
}
