#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
inline long long read() {
  long long x = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c <= '9' && c >= '0') {
    x = (x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  return w == 1 ? x : -x;
}
const int N = 2e3 + 10;
int a[N], n;
int main() {
  int _ = read();
  while (_--) {
    int n = read();
    if (n == 1) {
      puts("FastestFinger");
      continue;
    }
    if (n == 2) {
      puts("Ashishgup");
      continue;
    }
    if (n % 2) {
      puts("Ashishgup");
      continue;
    }
    int num1 = 0, num2 = 0;
    for (int i = 2; i * i <= n; ++i) {
      if (n % i == 0) {
        int res = 0;
        while (n % i == 0) n = n / i, res++;
        if (i == 2) num1 = res;
        if (i % 2) num2 += res;
      }
    }
    if (n == 2) num1++;
    if (n != 1 && n % 2) num2++;
    if (num1 == 1) {
      if (num2 > 1)
        puts("Ashishgup");
      else
        puts("FastestFinger");
    } else {
      if (num2 > 0)
        puts("Ashishgup");
      else
        puts("FastestFinger");
    }
  }
}
