#include <bits/stdc++.h>
using namespace std;
int pop_count(int u) {
  int ret = 0;
  while (u) {
    u = (u & (u - 1));
    ret++;
  }
  return ret;
}
bool Pr(int x) {
  if (x <= 1) return 0;
  for (int i = 2; i * i <= x; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
int cnt = 0;
int n;
int main() {
  int T;
  cin >> T;
  while (T--) {
    cin >> n;
    if (n == 1) {
      puts("FastestFinger");
    } else if (n == 2) {
      puts("Ashishgup");
    } else if (n % 2 == 1) {
      puts("Ashishgup");
    } else if (pop_count(n) == 1) {
      puts("FastestFinger");
    } else if (n % 4 == 0) {
      puts("Ashishgup");
    } else {
      n /= 2;
      if (Pr(n))
        puts("FastestFinger");
      else
        puts("Ashishgup");
    }
  }
  return 0;
}
