#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int t, n;
int tot;
int main() {
  for (scanf("%d", &t); t--;) {
    scanf("%d", &n);
    tot = 0;
    if (n == 1)
      puts("FastestFinger");
    else if (n == 2)
      puts("Ashishgup");
    else if (n % 2 == 1)
      puts("Ashishgup");
    else {
      while (!(n & 1)) n >>= 1, ++tot;
      if (n == 1)
        puts("FastestFinger");
      else {
        if (tot > 1)
          puts("Ashishgup");
        else {
          tot = 0;
          for (int i = 3; i <= n / i; i += 2)
            if (n % i == 0 && n / i > 1) {
              tot = 1;
              break;
            }
          if (tot)
            puts("Ashishgup");
          else
            puts("FastestFinger");
        }
      }
    }
  }
  return 0;
}
