#include <bits/stdc++.h>
bool compare(int a, int b) { return a < b; }
void swapped(char s1, char s2) {
  char temp = s1;
  s1 = s2;
  s2 = temp;
}
long long int modd(long long int n, long long int k) {
  return (k + (n % k)) % k;
}
bool i(long long first) { return first && (!(first & (first - 1))); }
bool p(long long n) {
  long long i, flag = 1;
  for (i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) {
      flag = 0;
      break;
    }
  }
  if (flag == 1) {
    return true;
  } else {
    return false;
  }
  return 0;
}
using namespace std;
void solve() {
  long long n;
  cin >> n;
  if (n == 1) {
    cout << "FastestFinger" << '\n';
    return;
  }
  if (n == 2) {
    cout << "Ashishgup" << '\n';
    return;
  }
  if (i(n)) {
    cout << "FastestFinger" << '\n';
    return;
  }
  if (n & 1) {
    cout << "Ashishgup" << '\n';
    return;
  }
  n /= 2;
  if (p(n)) {
    cout << "FastestFinger" << '\n';
    return;
  } else {
    cout << "Ashishgup" << '\n';
    return;
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
