#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n % 2 == 0)
            ++cnt2, n >>= 1;
        for(int i : p)
            if (n % i == 0)
                ++ul;
        bool win;
        if (ul == 0) win = 1;else
        if (cnt2 > 1 && ul >= 1) win = 0;else
        if (cnt2 == 1 && ul == 0) win = 0;else
        if (cnt2 == 1 && ul > 0) win = (ul == 1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n % 2 == 0)
            ++cnt2, n >>= 1;
        for(int i : p)
            if (n % i == 0)
                ++ul;
        int win = -1;
        if (ul == 0) win = 1; else
        if (ul == 1 && cnt2 == 1) win = 1; else
        if (ul == 1 && cnt2 > 1) win = 0; else
        if (ul > 1) win = 0;
        assert(win != -1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];

void enter()
{

}

void solve()
{
    fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
            for(int j = i*i; j < A; j += i)
                d[j] = false;
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) {cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int win = 0;
        while (n > 2 && n % 2 == 0)
        {
            bool ok = false;
            for(int i = 2; i*i <= n; ++i)
            {
                if (i % 2 == 1 && d[i])
                {
                    win ^= 1, n /= i;
                    ok = true;
                    break;
                }
                if (i % 2 == 0 && n % i == 0 && (n/i)%2 == 1 && d[n/i])
                {
                    n = i, win ^= 1;
                    ok = true;
                    break;
                }
            }
            if (!ok) {win ^= 1; break;}
        }
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};

void enter()
{

}

void solve()
{
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n ^ 1 & 1)
            ++cnt2, n >>= 1;
        for(int i = 3; i*i <= n; ++i)
            while (n % i == 0)
            {
                n /= i;
                ++ul;
            }
        if (n > 1) ++ul;
        int win = -1;
        if (ul == 0) win = 1; else
        if (ul == 1 && cnt2 == 1) win = 1; else
        if (ul == 1 && cnt2 > 1) win = 0; else
        if (ul > 1) win = 0;
        assert(win != -1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];

void enter()
{

}

void solve()
{
    fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
            for(int j = i*i; j < A; j += i)
                d[j] = false;
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) {cout << res[0]; continue;}
        int win = 1;
        while (n % 2 == 0)
        {
            bool ok = false;
            for(int i = 2; i*i <= n; ++i)
            {
                if (i % 2 == 1 && d[i])
                {
                    win ^= 1, n /= i;
                    ok = true;
                    break;
                }
                if (i % 2 == 0 && n % i == 0 && d[n/i])
                {
                    n = i, win ^= 1;
                    ok = true;
                    break;
                }
            }
            if (!ok) {win ^= 1; break;}
        }
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    /**fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }*/
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) {cout << res[0]; continue;}
        int win = 0;
        while (n > 2 && n % 2 == 0)
        {
            bool ok = false;
            for(int i = 2; i*i <= n; ++i)
            {
                if (i % 2 == 1)
                {
                    win ^= 1, n /= i;
                    ok = true;
                    break;
                }
                if (i % 2 == 0 && n % i == 0 && (n/i)%2 == 1)
                {
                    n = i, win ^= 1;
                    ok = true;
                    break;
                }
            }
            if (!ok) {win ^= 1; break;}
        }
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    /**fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }*/
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) {cout << res[0]; continue;}
        int win = 0;
        while (n > 2 && n % 2 == 0)
        {
            bool ok = false;
            for(int i = 2; i*i <= n; ++i)
            {
                if (i % 2 == 1 && n % i == 0)
                {
                    win ^= 1, n /= i;
                    ok = true;
                    break;
                }
                if (i % 2 == 0 && n % i == 0 && (n/i)%2 == 1)
                {
                    n = i, win ^= 1;
                    ok = true;
                    break;
                }
            }
            if (!ok) {win ^= 1; break;}
        }
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    /**fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }*/
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        int win = 0;
        while (n > 2 && n % 2 == 0)
        {
            bool ok = false;
            for(int i = 3; i*i <= n; ++i)
            {
                if (i % 2 == 1 && n % i == 0)
                {
                    win ^= 1, n /= i;
                    ok = true;
                    break;
                }
                if (i % 2 == 0 && n % i == 0 && (n/i)%2 == 1)
                {
                    n = i, win ^= 1;
                    ok = true;
                    break;
                }
            }
            if (!ok) {win ^= 1; break;}
        }
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};

void enter()
{

}

void solve()
{
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n & 1 ^ 1)
            ++cnt2, n >>= 1;
        for(int i = 3; i*i <= n; ++i)
            while (n % i == 0)
            {
                n /= i;
                ++ul;
            }
        if (n > 1) ++ul;
        int win = -1;
        if (ul == 0) win = 1; else
        if (ul == 1 && cnt2 == 1) win = 1; else
        if (ul == 1 && cnt2 > 1) win = 0; else
        if (ul > 1) win = 0;
        assert(win != -1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};

void enter()
{

}

void solve()
{
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n % 2 == 0)
            ++cnt2, n >>= 1;
        for(int i = 3; i*i <= n; ++i)
            while (n % i == 0)
            {
                n /= i;
                ++ul;
            }
        if (n > 1) ++ul;
        int win = -1;
        if (ul == 0) win = 1; else
        if (ul == 1 && cnt2 == 1) win = 1; else
        if (ul == 1 && cnt2 > 1) win = 0; else
        if (ul > 1) win = 0;
        assert(win != -1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    /**fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }*/
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n % 2 == 0)
            ++cnt2, n >>= 1;
        for(int i = 3; i*i <= n; ++i)
            if (n % i == 0)
            {
                while (n % i == 0)
                {
                    n /= i;
                    ++ul;
                }
            }
        ///cout << cnt2 << ' ' << ul << endl;
        if (n > 1) ++ul;
        int win = -1;
        if (ul == 0) win = 1; else
        if (ul == 1 && cnt2 == 1) win = 1; else
        if (ul == 1 && cnt2 > 1) win = 0; else
        if (ul > 1) win = 0;
        assert(win != -1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <assert.h>
#include <algorithm>
#include <math.h>
#include <string.h>
#include <limits.h>
#include <numeric>
#include <chrono>
#include <functional>
#include <tuple>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <array>
#include <bitset>
#include <unordered_map>

#define foru(i, a, b) for(int i = a, _b = (b)+1; i < _b; ++i)
#define ford(i, a, b) for(int i = a, _b = (b)-1; i > _b; --i)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define fr freopen
#define eb emplace_back
#define ep emplace

using namespace std;

template <class X>
bool mini(X& a, const X& b)
{
    if (a > b) { a = b; return true; } return false;
}

template <class X>
bool maxi(X& a, const X& b)
{
    if (a < b) { a = b; return true; } return false;
}

typedef const int& ci;
typedef long long ll;
typedef pair <int, int> pii;

const int A = 1e5+1;

string res[] = {"Ashishgup\n", "FastestFinger\n"};
bool d[A];
vector <int> p;

void enter()
{

}

bool prime(int x)
{
    if (x < 2) return false;
    for(int& i : p)
    {
        if (1ll*i*i > x) return true;
        if (x % i == 0)
            return false;
    }
}

void solve()
{
    /**fill(d+2, d+A, true);
    for(int i = 2; i*i < A; ++i)
        if (d[i])
        {
            for(int j = i*i; j < A; j += i)
                d[j] = false;
            p.eb(i);
        }*/
    int test;
    for(cin >> test; test--;)
    {
        int n;
        cin >> n;
        if (n == 1) {cout << res[1]; continue;}
        if (n & 1) { cout << res[0]; continue;}
        if (n == 2) {cout << res[0]; continue;}
        int cnt2 = 0, ul = 0;
        while (n % 2 == 0)
            ++cnt2, n >>= 1;
        for(int i = 3; i*i <= n; ++i)
            if (n % i == 0)
            {
                while (n % i == 0)
                    n /= i;
                ++ul;
            }
        if (n > 1) ++ul;
        int win = -1;
        if (ul == 0) win = 1; else
        if (ul == 1 && cnt2 == 1) win = 1; else
        if (ul == 1 && cnt2 > 1) win = 0; else
        if (ul > 1) win = 0;
        assert(win != -1);
        cout << res[win];
    }
}

int main()
{
    #define haid ""

    ios_base :: sync_with_stdio(false); cin.tie(nullptr);
#ifndef ONLINE_JUDGE
    fr(haid".inp", "r", stdin);

#endif
    enter();
    solve();
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms";
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<i(nt>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

#define win1   cout<<"Ashishgup\n";

#define win2 cout<<"FastestFinger\n";

void solve()
{
    ll n;
    cin>>n;
    if(n==1)
    {
        win2;
        return;
    }
    if(n%2==1 || n==2)
    {
            win1;
            return;}
    ll p=2;
    while(n%p==0)
        p*=2;
    p/=2;
    if(n==p)
    {    win2
    return;}
    if(p>2)
    {    win1
    return;}
    n/=2;
    int i;
    for(i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {    win1
        return;}
    }
    win2
    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n,i;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        vector<int> div;
        c=0;int l;
        for(i=2;i<=sqrt(n);i++)
        {
            if(i%2==1 && n%i==0)
            {
                l=n/i;
                if(l%2==1)
                    div.push_back(n/i);
                while(n%i==0)
                {
                    n/=i;
                    c++;
                }
            }
            if(c>1)
                break;
        }
        if(c<2)
            for(i=0;i<(sz(div));i++)
            {
                    if(n%div[i]==0)
                        c++;
                    if(c==2)
                        break;
            }
        if(c>=2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
        cout<<"Ashishgup\n";
    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n,i;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        c=0;
        int q=n;
        for(i=3;i<q;i+=2)
        {
            while(n%i==0)
            {
                n/=i;
                c++;
            }
            if(n==2)
                break;

            if(c>=2)
                break;
        }
        if(c>=2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n,i;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        c=0;
        int q=n,l;
        for(i=3;i<=sqrt(q);i+=2)
        {
            if(n==2)
                break;
            if(n%i==0)
            {
                while(i%2==1 && n%i==0)
                {
                    n/=i;
                    c++;
                }
            }
            if(c>1)
                break;
        }
        if(c>=2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<i(nt>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

#define win1   cout<<"Ashishgup\n";

#define win2 cout<<"FastestFinger\n";

void solve()
{
    ll n;
    cin>>n;
    if(n%2==1 || n==2)
    {
            win1;
            return;}
    ll p=2;
    while(n%p==0)
        p*=2;
    p/=2;
    if(n==p || n==1)
    {    win2
    return;}
    if(p>2)
    {    win1
    return;}
    n/=2;
    int i;
    for(i=2;i<=sqrt(n);i++)
    {
        if(n%i==0)
        {    win1
        return;}
    }
    win2
    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        int q=n,l=3;
        c=0;
        while(q>1 && q%2==0)
        {
            while(q%l==0)
            {
                c++;
                q/=l;
            }
            l+=2;
            if(c==2)
                break;
        }
        if(c==2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n,i;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        c=0;
        int q=n,l;
        for(i=2;i<=sqrt(q);i++)
        {
            if(n==2)
                break;
            if(n%i==0)
            {
                l=n/i;
                while(i%2==1 && n%i==0)
                {
                    n/=i;
                    c++;
                }
                while(n%i!=0 && l%2==1 && n%l==0)
                {
                    n/=l;c++;
                }
            }
            if(c>1)
                break;
        }
        if(c>=2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n;
    cin>>n;
    int c=0;
    if(n==1)
    {    cout<<"FastestFinger\n";
    return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
    return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==n || p==2)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n,i;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        c=0;
        int q=n,l;
        for(i=3;i<=n;i+=2)
        {
            while(n%i==0)
            {
                n/=i;
                c++;
            }
            if(n==2)
                break;

            if(c>=2)
                break;
        }
        if(c>=2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include<bits/stdc++.h>
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
*/
using namespace std;

#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define tr(container,it) for(typeof(container).begin() it=container.begin();it!=container.end();it++)
#define fast ios_base::sync_with_stdio(false);
#define ll long long int
#define sz(x) (int)(x.size())

const ll mod=1e9+7;

void solve()
{
    int n,i;
    cin>>n;
    int c=0;
    if(n==1)
    {
        cout<<"FastestFinger\n";
        return;
    }
    if(n==2)
    {
        cout<<"Ashishgup\n";
        return;
    }
    if(n%2==1)
    {
        cout<<"Ashishgup\n";
        return;
    }
    ll p=2;
    while(n%p==0)
    {
        p=p*2;
    }
    p/=2;
    if(p==2)
    {
        int q=n,l=3;
        c=0;
        for(i=3;i<n;i+=2)
        {
            while(i%2==1 && n%i==0)
            {
                n/=i;
                c++;
            }
            if(c==2)
                break;
        }
        if(c==2)
            cout<<"Ashishgup\n";
        else
        {
            cout<<"FastestFinger\n";
        }
        return;
    }
    if(p==n)
        cout<<"FastestFinger\n";
    else
    {
        cout<<"Ashishgup\n";
    }

    return;
}
int main()
{
	fast
    int t;
    cin>>t;
    while(t--)
        solve();
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				cout << "FastestFinger\n";
			else
				cout << "Ashishgup\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	for(long long p = 2; p * p < MN; p++){
		if(sieve[p]) continue;
		for(long long i = p * p; i < MN; i += p)
			sieve[i] = true;
	}

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;
		int cnt = 1;
		if(!sieve[N-1]) {
			cout << "FastestFinger\n";
			continue;
		}

		while(N!=1) {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				N--;

			else {
				for(int p = 3; p <= N; p+=2) {
					if(N % p == 0){
						while (N % p == 0){
							N /= p;
						}
					}
				}
			}

			cnt++;
		}

		if(cnt % 2 == 0)
			cout << "Ashishgup\n";
		else
			cout << "FastestFinger\n";
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;
		int cnt = 1;

		while(N!=1) {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				N--;

			else {
				for(int p = 3; p <= N; p+=2) {
					if(N % p == 0){
						while (N % p == 0){
							N /= p;
						}
					}
				}
			}

			cnt++;
		}

		if(cnt % 2 == 0)
			cout << "Ashishgup\n";
		else
			cout << "FastestFinger\n";
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				for(int i = 2, int n = N/2; i < n; i++)
					if(n % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;
		int cnt = 1;

		while(N!=1) {
			int check = 0;
			for(int i = 0; i < 32; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				N--;

			else {
				for(int p = 3; p <= N; p+=2) {
					if(N % p == 0){
						while (N % p == 0){
							N /= p;
						}
					}
				}
			}

			cnt++;
		}

		if(cnt % 2 == 0)
			cout << "Ashishgup\n";
		else
			cout << "FastestFinger\n";
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;
bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	for(int p = 2; p*p < MN; p++) {
		if(sieve[p]) continue;
		for(int i = p*p; i < MN; i+=p)
			sieve[i] = true;
	}

	int T;	cin >> T;
	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)  //N이 2의 n승
				cout << "FastestFinger\n";
			else if(N % 4 == 0) //N이 4*홀수
				cout << "Ashishgup\n";
			else if(sieve[N/2]) //N이 2*소수*홀수
				cout << "Ashishgup\n";
			else  //N이 2*소수
				cout << "FastestFinger\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				for(int i = 2; i < N/2; i++)
					if((N/2) % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				cout << "FastestFinger\n";
			else if ((N/2) % 2)
				cout << "FastestFinger\n";
			else
				cout << "Ashishgup\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;
bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	for(int p = 2; p*p < MN; p++) {
		if(sieve[p]) continue;
		for(int i = p*p; i < MN; i+=p)
			sieve[i] = true;
	}

	int T;	cin >> T;
	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)  //N이 2의 n승
				cout << "FastestFinger\n";
			else if(N % 4 == 0) //N이 4*홀수
				cout << "Ashishgup\n";
			else if(sieve[N/2]) //N이 2*소수
				cout << "Ashishgup\n";
			else  //N이 2*소수*홀수
				cout << "FastestFinger\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			int check = 0;
			for(int i = 0; i < 30; i++) {
				if((1 << i) & N)
					check++;
			}

			if(check == 1)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				for(int i = 2, n = N/2; i < n; i++)
					if(n % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 1010101010;
bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	for(int p = 2; p*p < MN; p++) {
		if(sieve[p]) continue;
		for(int i = p*p; i < MN; i+=p)
			sieve[i] = true;
	}

	int T;	cin >> T;
	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)  //N이 2의 n승
				cout << "FastestFinger\n";
			else if(N % 4 == 0) //N이 4*홀수
				cout << "Ashishgup\n";
			else if(sieve[N/2]) //N이 2*소수*홀수
				cout << "Ashishgup\n";
			else  //N이 2*소수
				cout << "FastestFinger\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 1000000001;
bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	for(int p = 2; p*p < MN; p++) {
		if(sieve[p]) continue;
		for(int i = p*p; i < MN; i+=p)
			sieve[i] = true;
	}

	int T;	cin >> T;
	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)  //N이 2의 n승
				cout << "FastestFinger\n";
			else if(N % 4 == 0) //N이 4*홀수
				cout << "Ashishgup\n";
			else if(sieve[N/2]) //N이 2*소수*홀수
				cout << "Ashishgup\n";
			else  //N이 2*소수
				cout << "FastestFinger\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;
bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	for(int p = 2; p*p < MN; p++) {
		if(sieve[p]) continue;
		for(int i = p*p; i < MN; i+=p)
			sieve[i] = true;
	}

	int T;	cin >> T;
	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else if(sieve[N/2])
				cout << "Ashishgup\n";
			else
				cout << "FastestFinger\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				int check = 0;
				for(int i = 3, n = N/2; i < min(n,11000); i+=2)
					if(n % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				int check = 0;
				for(int i = 3, n = N/2; i < min(n,33000); i+=2)
					if(n % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;
bool sieve[MN];
int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);
	int T;	cin >> T;

	for(int p = 2; p*p < MN; p++) {
		if(sieve[p]) continue;
		for(int i = p*p; i < MN; i+=p)
			sieve[i] = true;
	}

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else if(sieve[N/2])
				cout << "Ashishgup\n";
			else
				cout << "FastestFinger\n";
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				int check = 0;
				for(int i = 2, n = N/2; i < n; i++)
					if(n % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include <bits/stdc++.h>

using namespace std;

const int MN = 110101010;

int main(void)
{
	ios::sync_with_stdio(false);	cin.tie(NULL);

	int T;	cin >> T;

	while(T--) {
		int N;	cin >> N;

		if(N == 1)
			cout << "FastestFinger\n";
		else if (N == 2)
			cout << "Ashishgup\n";
		else if(N % 2) {
			cout << "Ashishgup\n";
		}
		else {
			if((N & (N-1)) == 0)
				cout << "FastestFinger\n";
			else if(N % 4 == 0)
				cout << "Ashishgup\n";
			else {
				int check = 0;
				for(int i = 3, n = N/2; i < min(n,50000); i+=2)
					if(n % i == 0) {
						check = 1;
						break;
					}

				if(check == 1)
					cout << "Ashishgup\n";
				else
					cout << "FastestFinger\n";
			}
		}
	}
}


#include<bits/stdc++.h>
using namespace std;

const int N = 50000;

void player_1(){
	cout << "Ashishgup" << endl;
}

void player_2(){
	cout << "FastestFinger" << endl;
}

bool check_prime(int n){
	for(int i = 2; i < min(N, n); i++)
		if(n % i == 0)
			return 0;
	return 1;
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = (n == 1);
		if(n > 2 && n % 2 == 0){
			if(n&(n-1) == 0){
				lose = 1;
			}
			else if(n % 4 != 0 && check_prime(n / 2)) {
				lose = 1;
			}
		}
		if(lose) player_2();
		else player_1();
	}
}


#include<bits/stdc++.h>
using namespace std;
int Count;
int biggset_divisor(int y){
	int note=(int)sqrt(y);
	for(int i=y-1;i>=note;i--){
		if(y%i==0 && i%2!=0) return i;
	}
	return 0;//否则这个偶数没有最大奇因子
}
void determine_winner(){
	if(Count%2==0) cout<<"FastestFinger"<<endl;
	else cout<<"Ashishgup"<<endl;
}
void oprator(int m){
	if(m==1){
		determine_winner();
		return;
	}
	else if(m==2){
		Count++;
		determine_winner();
		return;
	}
	else if(m%2==1) {
		Count++;
		determine_winner();
	}
	else{
		int temp=biggset_divisor(m);
		if(temp) {
			Count++;
			oprator(m/temp);
		}else{
			Count++;
			oprator(m-1);
		}
	}
}
int main(){
	int n,i;cin>>n;
	while(n--){
		Count=0;
		cin>>i;
		oprator(i);
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

bool check_prime(int n){
	if(n < 2) return false;
	for(int i = 2; i * i <= n; i++){
		if(n % i == 0) return false;
	}
	return true;
}

int main(){
	int t;
	cin >> t;
	while(t--){
		int n;cin >> n;
		if(n & (n - 1) == 0 && n != 2) {cout << "FastestFinger" << endl; continue;}
		if(n % 2 == 1) {cout << "Ashishgup" << endl; continue;}
		if(check_prime(n / 2)) {cout << "FastestFinger" << endl; continue;}
		cout << "Ashishgup" << endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;

const int N = 50000;

void player_1(){
	cout << "Ashishgup" << endl;
}

void player_2(){
	cout << "FastestFinger" << endl;
}

bool check_prime(int n){
	for(int i = 2; i < min(N, n); i++)
		if(n % i == 0)
			return 0;
	return 1;
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = (n == 1);
		if(n > 2 && n % 2 == 0){
			if((n & (n — 1)) == 0)
				lose = 1;
			else if(n % 4 != 0 && check_prime(n / 2))
				lose = 1;
		}
		if(lose)
			player_2();
		else player_1();
	}
}


#include<bits/stdc++.h>
using namespace std;

const int N = 50000;

bool check_prime(int n){
	for(int i = 2; i < min(N, n); i++)
		if(n % i == 0)
			return false;//不是质数
	return true;//是质数
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = true;//默认输，上来是1，A必输
		if(n == 2 || (n > 2 && n % 2 != 0)) lose = false;//若是2或者是奇数，A还能赢
		if(n > 2 && n % 4 == 0){//大于2的偶数，A什么时候能赢呢？
			for(int i = 4; i < n;i *= 2){//质数*2的大于2次幂
				if(check_prime(n / i)){
					lose = false;
					break;
				}
			}
		}
		if(lose) cout << "FastestFinger" << endl;
		else cout << "Ashishgup" << endl;
	}
}


#include<bits/stdc++.h>
using namespace std;

const int N = 50000;

bool check_prime(int n){
	for(int i = 2; i < min(N, n); i++)
		if(n % i == 0)
			return false;//不是质数
	return true;//是质数
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = true;//默认输，上来是1，A必输
		if(n == 2 || (n > 2 && n % 2 != 0)) lose = false;//若是2或者是奇数，A还能赢
		if(n > 2 && n % 4 == 0){//大于2的偶数，A什么时候能赢呢？
			for(int i = 4; i < n; i *= 2){//奇数*2的大于1次幂
				if(check_prime(n/i)){
					lose = false;
					break;
				}
			}
		}
		if(n > 2 && n % 2 == 0){
			for(int i = 3; i % 2 != 0 && (n % i)==0 && i < n; i++){//奇数*2*素数
				if(check_prime(n/(2*i))){
					lose = false;
					break;
				}
			}
			if(check_prime(n/2)) lose=true;
		}
		if(lose) cout << "FastestFinger" << endl;
		else cout << "Ashishgup" << endl;
	}
}


#include<bits/stdc++.h>
using namespace std;

bool check_prime(int n){
	if(n < 2) return false;
	for(long long i = 2; i * i <= n; i++){
		if(n % i == 0) return false;
	}
	return true;
}

int main(){
	int t;
	cin >> t;
	while(t--){
		int n;cin >> n;
		if(n == 1) {cout << "FastestFinger" << endl; continue;}
		if(n & (-n) == n && n != 2) {cout << "FastestFinger" << endl; continue;}
		if(n % 2 == 1) {cout << "Ashishgup" << endl; continue;}
		if(check_prime(n / 2)) {cout << "FastestFinger" << endl; continue;}
		cout << "Ashishgup" << endl;
	}
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
void player_1(){
	cout << "Ashishgup" << endl;
}

void player_2(){
	cout << "FastestFinger" << endl;
}

bool check_prime(int n){
	for(int i = 2; i < n; i++)
		if(n % i == 0)
			return 0;//不是素数
	return 1;//是素数
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = (n == 1);
		if(n > 2 && n % 2 == 0){
			if(n&(n-1)==0) lose = 1;
			else if(n%4!=0 && check_prime(n / 2)) lose = 1;
		}
		if(lose) player_2();
		else player_1();
	}
}


#include<bits/stdc++.h>
using namespace std;
void player_1(){
	cout << "Ashishgup" << endl;
}

void player_2(){
	cout << "FastestFinger" << endl;
}

bool check_prime(int n){
	int sqr = (int)sqrt(1.0*n);
	for(int i = 2; i <= sqr; i++)
		if(n % i == 0)
			return 0;//不是素数
	return 1;//是素数
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = (n == 1);
		if(n > 2 && n % 2 == 0){
			if(n&(n-1)==0) lose = 1;
			else if(n%4!=0 && check_prime(n / 2)) lose = 1;
		}
		if(lose) player_2();
		else player_1();
	}
}


#include<bits/stdc++.h>
using namespace std;

const int N = 50000;

bool check_prime(int n){
	for(int i = 2; i < min(N, n); i++)
		if(n % i == 0)
			return false;//不是质数
	return true;//是质数
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = true;//默认输，上来是1，A必输
		if(n == 2 || (n > 2 && n % 2 != 0)) lose = false;//若是2或者是奇数，A还能赢
		if(n > 2 && n % 4 == 0){//大于2的偶数，A什么时候能赢呢？
			for(int i = 4; i < n; i *= 2){//奇数*2的大于1次幂
				if((n/i)%2==1){
					lose = false;
					break;
				}
			}
		}
		if(n > 2 && n % 2 == 0){
			for(int i = 3; i % 2 != 0 && (n % i)==0 && i < n; i++){//奇数*2*素数
				if(check_prime(n/(2*i)) && n/(2*i)>2){
					lose = false;
					break;
				}
			}
			if(check_prime(n/2)) lose=true;
		}
		if(lose) cout << "FastestFinger" << endl;
		else cout << "Ashishgup" << endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
void player_1(){
	cout << "Ashishgup" << endl;
}

void player_2(){
	cout << "FastestFinger" << endl;
}

bool check_prime(int n){
	int sqr = (int)sqrt(1.0*n);
	for(int i = 2; i <= sqr; i++)
		if(n % i == 0)
			return 0;//不是素数
	return 1;//是素数
}

int main(){
	int tc;
	cin >> tc;
	while(tc--){
		int n;
		cin >> n;
		bool lose = (n == 1);
		if(n > 2 && n % 2 == 0){
			if(n&(n-1)==0) lose = 1;
			else if(check_prime(n / 2)) lose = 1;
		}
		if(lose) player_2();
		else player_1();
	}
}


#include <bits/stdc++.h>
using namespace std;

int isPrime(int x){
	if(x < 2) return 0;
	for(long long i=2; i*i<=x; i++) if(x % i == 0) return 0;
	return 1;
}

void solve(){
	int n; cin >> n;
	if((n &(-n)) == n && n != 2){ cout <<"FastestFinger\n"; return; }
	if(n % 2 == 1){ cout <<"Ashishgup\n"; return; }
	if(isPrime(n/2)){ cout <<"FastestFinger\n"; return; }
	cout << "Ashishgup\n";
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	int t; cin >> t;
	while(t--) solve();
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else{
			if(n%2==1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			vector<int> vv;
			for(int i=3;i<=sqrt(n);i+=2)
			{
				if(n%i==0)
				{
					vv.push_back(i);
				}
				int pp=n/i;
				if(pp%2==1 && n%pp==0)
				{
					vv.push_back(pp);
				}
			}
			if(vv.size()==0)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				int ppp=1;
				for(int i=0;i<vv.size();i++)
				{
					if((n/vv[i])%2==0)
					{
						ppp=0;break;
					}

				}
				if(ppp) cout<<"FastestFinger"<<endl;
				else cout<<"Ashishgup"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else{
			if(n%2==1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			vector<int> vv;
			for(int i=3;i<=sqrt(n);i+=2)
			{
				if(n%i==0)
				{
					vv.push_back(i);
				}
				int pp=n/i;
				if(pp%2==1 && n%pp==0)
				{
					vv.push_back(pp);
				}
			}
			if(vv.size()==0)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				int ppp=1;
				for(int i=0;i<vv.size();i++)
				{
					if(n/vv[i]!=2)
					{
						ppp=0;break;
					}

				}
				if(ppp) cout<<"FastestFinger"<<endl;
				else cout<<"Ashishgup"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else{
			if(n%2==1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			vector<int> vv;
			for(int i=2;i<=sqrt(n);i++)
			{
				if(n%i==0)
				{
					vv.push_back(i);
				}
				int pp=n/i;
				if(pp%2==1 && n%pp==0)
				{
					vv.push_back(pp);
				}
			}
			if(vv.size()==0)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				int ppp=1;
				for(int i=0;i<vv.size();i++)
				{
					if((n/vv[i])!=2)
					{
						ppp=0;break;
					}

				}
				if(ppp) cout<<"FastestFinger"<<endl;
				else cout<<"Ashishgup"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		long n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		else if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else if(n%2==1)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else
		{
			int odd=1;
			int pp=0;
			while(n%2==0)
			{
				n=n/2;
				pp++;
			}
			if(pp==1)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else{
			if(n%2==1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			vector<int> vv;
			for(int i=2;i<=sqrt(n);i++)
			{
				if(n%i==0)
				{
					vv.push_back(i);
				}
				int pp=n/i;
				if(pp%2==1 && n%pp==0)
				{
					vv.push_back(pp);
				}
			}
			if(vv.size()==0)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				int ppp=1;
				for(int i=0;i<vv.size();i++)
				{
					if((n/vv[i])==2)
					{
						ppp=0;break;
					}

				}
				if(ppp) cout<<"FastestFinger"<<endl;
				else cout<<"Ashishgup"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;

		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		if(n%2==1)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else
		{
			int cnt=0;
			for(int i=3;i<=sqrt(n);i+=2)
			{
				if(n%i==0 && ((n/i)%2==0))
				{
					n=n/i;
					cnt++;
				}
			}

			if(cnt%2)
			{
				cout<<"Ashishgup"<<endl;;
			}
			else{
				cout<<"FastestFinger"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else {
					int flg=0;
					for(int i=3;i<=sqrt(n);i+=2)
					if(n%(2*i)==0)
					{
						cout<<"Ashishgup"<<endl;
						flg=1;
						continue;
					}
					if(flg==0 && n%2==1)
					{
						cout<<"Ashishgup"<<endl;
						continue;
					}
					else if(flg==0 && n%2==0){
						cout<<"FastestFinger"<<endl;
						continue;
					}

		}
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		long n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		else if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else if(n%2==1)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else
		{
		//	int odd=1;
			int pp=0;
			while(n%2==0)
			{
				n=n/2;
				pp++;
			}
			if(n!=1 && pp>1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			else
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else{
			if(n%2==1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			vector<int> vv;
			for(int i=3;i<=sqrt(n);i+=2)
			{
				if(n%i==0)
				{
					vv.push_back(i);
				}
			}
			if(vv.size()==0)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				int ppp=1;
				for(int i=0;i<n;i++)
				{
					if(n/vv[i]!=2)
					{
						ppp=0;break;
					}

				}
				if(ppp) cout<<"FastestFinger"<<endl;
				else cout<<"Ashishgup"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		int n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else{
			if(n%2==1)
			{
				cout<<"Ashishgup"<<endl;
				continue;
			}
			vector<int> vv;
			for(int i=3;i<=sqrt(n);i+=2)
			{
				if(n%i==0)
				{
					vv.push_back(i);
				}
			}
			if(vv.size()==0)
			{
				cout<<"FastestFinger"<<endl;
				continue;
			}
			else
			{
				int ppp=1;
				for(int i=0;i<vv.size();i++)
				{
					if(n/vv[i]!=2)
					{
						ppp=0;break;
					}

				}
				if(ppp) cout<<"FastestFinger"<<endl;
				else cout<<"Ashishgup"<<endl;
			}
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	int tc;
	cin>>tc;
	while(tc--)
	{
		long n;
		cin>>n;
		if(n==1)
		{
			cout<<"FastestFinger"<<endl;
			continue;
		}
		else if(n==2)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else if(n%2==1)
		{
			cout<<"Ashishgup"<<endl;
			continue;
		}
		else
		{
			int cntr=0,cnt2=0;
			for(int i=2;i*i<=n;i++)
			{
				if(n%i==0)
				{
					while(n%i==0)
					{
						n/=i;
						if(i==2)cnt2++;
						else cntr++;
					}
				}
			}
			if(n==2) cnt2++;
			if(n>2) cntr++;
			if(cnt2>1)
			{
				if(cntr)cout<<"Ashishgup"<<endl;
				else cout<<"FastestFinger"<<endl;
			}
			else{
				if(cntr>1)cout<<"Ashishgup"<<endl;
				else cout<<"FastestFinger"<<endl;
			}
		}
	}
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef unsigned long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
//ll dp[1000];

void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	//preprocess(n);
	while(n>1)
	{
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll temp=n,res=1;
			while((temp)%2==0)
			{
				res=res*2;
				temp/=2;
			}
			if(res==n)
			{
				n--;c++;
			}
			else
			{
				n=res;
				c++;
			}
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	while(n>1)
	{
		cout<<n;nl;
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			for(ll i=3;i<n/2;i+=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					f=1;
					break;
				}
			}
			if(f) continue;
			c++;
			n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
bool isprime(ll n)
{
	for(ll i=3;i*i<=n;i+=2)
	{
		if(n%i==0) return false;
	}
	return true;
}
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	if(n==1) ;
	else if(n==2) c++;
	else if(log2(n)==floor(log2(n)))
	c=2;
	else if(n%2==1) c++;
	else
	{
		ll temp=n,res=1;
		while(temp%2==0)
		temp/=2,res*=2;
		if(res==2)
		{
			if(isprime(temp)) c=0;
			else c=1;
		}
		else
		{
			c=1;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef unsigned long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
//ll dp[1000];
bool isprime(ll n)
{
	for(ll i=2;i*i<=n;i++)
	{
		if(n%i==0) return false;
	}
	return true;
}
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	//preprocess(n);
	while(n>1)
	{
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			if(isprime(n))
			{
				n=1;
				c++;
				continue;
			}
			for(ll i=3;i<n/2;i+=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					break;
					f=1;
				}
			}
			if(f) continue;
			c++;
			n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef unsigned long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
//ll dp[1000];
ll find(ll n)
{
	for(ll i=3;i*i<=n;i+=2)
	{
		if(n%i==0)
		{
			return n/i;
		}
	}
	return 1;
}
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	//preprocess(n);
	while(n>1)
	{
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll temp=n,res=1;
			while((temp)%2==0)
			{
				res=res*2;
				temp/=2;
			}
			ll k= find(temp);
			res*=k;
			if(res==n)
			{
				n--;c++;
				continue;
			}
			else{
				n=res;
				c++;
			}

		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef unsigned long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
//ll dp[1000];
ll find(ll n)
{
	for(ll i=3;i*i<=n;i+=2)
	{
		if(n%i==0)
		{
			return n/i;
		}
	}
	return 1;
}
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	//preprocess(n);
	while(n>1)
	{
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll temp=n,res=1;
			while((temp)%2==0)
			{
				res=res*2;
				temp/=2;
			}
			if(res==n)
			{
				n--;c++;
				continue;
			}
			ll k= find(temp);
			n=res*k;
			c++;

		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	while(n>1)
	{
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			for(ll i=3;i*i<n;i+=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					break;
					f=1;
				}
			}
			if(f) continue;
			c++;
			n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	while(n>1)
	{
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			for(ll i=3;i<n/2;i+=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					break;
					f=1;
				}
			}
			if(f) continue;
			c++;
			n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}
ll binpow(ll a, ll b) {
   ll res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
ll gcd(ll a,ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	while(n>1)
	{
		//cout<<n;nl;
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			if(log2(n)==floor(log2(n)))
			{
				n--,c++;
			}
			else{
				ll i=n/2;
				if(i%2==0) i--;
			for( i;i>1 && f==0;i-=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					f=1;
				}
			}
			}
			//if(f) continue;
			//c++;
			//n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	while(n>1)
	{
		//cout<<n;nl;
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			if(log2(n)==floor(log2(n)))
			{
				n--,c++;
			}
			else{
			for( ll i=3;i<=(n/2) && f==0;i+=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					f=1;
				}
			}
			}
			if(f) continue;
			//c++;
			//n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define N 2*10e5
#define precise cout<<fixed<<setprecision(10)
#pragma GCC optimize("O0")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize ("-ffloat-store")
#define rep(i,a,b) for(int i=a;i<b;i++)
#define min3(a,b,c) min(a,min(b,c))
#define nl cout<<"\n";
#define all(v) v.begin(),v.end()
#define F first
#define S second
typedef long long ll;
typedef vector<long long> vl;
typedef vector<pair<long,long>> vp;
void get(ll arr[],ll n){for(ll i=0;i<n;i++) cin>>arr[i];}
ll gcd(ll a,ll b);
ll binpow(ll a,ll b);
void solve()
{
	ll n;
	cin>>n;
	string x="Ashishgup",y="FastestFinger";
	ll c=0;
	while(n>1)
	{
		//cout<<n;nl;
		if(n%2==1)
		{
			c++;
			n=1;
		}
		else
		{
			ll f=0;
			if(log2(n)==floor(log2(n)))
			{
				n--,c++;
			}
			else{
			for(ll i=3;i<=n/2;i+=2)
			{
				if(n%i==0 && (n/i)%2==0)
				{
					c++;
					n=n/i;
					f=1;
					break;
				}
			}
			}
			//if(f) continue;
			//c++;
			//n--;
		}
	}
	if(c%2==0) cout<<y<<"\n";
	else cout<<x<<"\n";
}
int main()
{
 	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	ll t;
	t=1;
	cin>>t;
	while(t--)
	{
	 	solve();
	}
	//cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int turn=0;
    while(n!=1)
    {
        if(n%2==1)
        {
            n=1;
        }
        else
        {
            int flag=0;
            for(int i=3;i<n;i+=2)
            {
                if(n%i==0 && (n/i)%2==0 && (n/i)!=2)
                {
                    n/=i;
                    flag=1;
                    break;
                }
            }
            if(flag==0)
            {
                n--;
            }
        }
        turn=turn^1;
    }
    if(turn==0){cout<<"FastestFinger"<<endl;}
    else
    {
        cout<<"Ashishgup"<<endl;
    }

}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int turn=0;
    while(n!=1)
    {
        if(n%2==1)
        {
            n=1;
        }
        else
        {
            int flag=0;
            for(int i=n-1;i>2;i-=2)
            {
                if(n%i==0 && (n/i)%2==0 && (n/i)!=2)
                {
                    n/=i;
                    flag=1;
                    break;
                }
            }
            if(flag==0)
            {
                n--;
            }
        }
        turn=turn^1;
    }
    if(turn==0){cout<<"FastestFinger"<<endl;}
    else
    {
        cout<<"Ashishgup"<<endl;
    }

}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int turn=0;
    while(n!=1)
    {
        if(n%2==1)
        {
            n=1;
        }
        else
        {
            int flag=0;
            for(int i=3;i<n;i+=2)
            {
                if(n%i==0 && (n/i)%2==0)
                {
                    n/=i;
                    flag=1;
                    break;
                }
            }
            if(flag==0)
            {
                n--;
            }
        }
        turn=turn^1;
    }
    if(turn==0){cout<<"FastestFinger"<<endl;}
    else
    {
        cout<<"Ashishgup"<<endl;
    }

}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    if(n%2==1)
    {
        if(n==1)
        {
            cout<<"FastestFinger"<<endl;
        }
        else
        {
            cout<<"Ashishgup"<<endl;
        }
    }
    else if(n==2)
    {
        cout<<"Ashishgup"<<endl;
    }
    else if(n==4 || n==6 || n==8 ||n==10)
    {
        cout<<"FastestFinger"<<endl;
    }
    else
    {
        if(n%4==0 || n%6==0 || n%8==0 || n%10==0)
        {
            if(((n/4)%2==1)||((n/6)%2==1)||((n/8)%2==1)||((n/10)%2==1))
            {
                cout<<"Ashishgup"<<endl;
            }
            else
            {
                cout<<"FastestFinger"<<endl;
            }
        }
        else
        {
            cout<<"FastestFinger"<<endl;
        }

    }

}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    if(n%2==1)
    {
        if(n==1)
        {
            cout<<"FastestFinger"<<endl;
        }
        else
        {
            cout<<"Ashishgup"<<endl;
        }
    }
    else if(n==2)
    {
        cout<<"Ashishgup"<<endl;
    }
    else if(n==4 || n==6 || n==8 ||n==10)
    {
        cout<<"FastestFinger"<<endl;
    }
    else
    {
        if(n%4==0 || n%6==0 || n%8==0 || n%10==0)
        {
            int flag=1;
            if(n%4==0){if((n/4)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            if(n%6==0 && flag==1){if((n/6)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            if(n%8==0 && flag==1){if((n/8)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            if(n%10==0 && flag==1){if((n/10)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            if(flag==1)
            {
                cout<<"FastestFinger"<<endl;
            }
        }
        else
        {
            cout<<"FastestFinger"<<endl;
        }

    }

}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    int turn=0;
    while(n!=1)
    {
        if(n%2==1)
        {
            n=1;
        }
        else
        {
            int flag=0;
            int ct = n/2;
            if(ct%2==0){ct--;}
            int co = n/10;
            if(co%2==0){co--;}
            for(int i=ct;i>=co;i-=2)
            {
                if(n%i==0 && (n/i)%2==0 && (n/i)!=2)
                {
                    n/=i;
                    flag=1;
                    break;
                }
            }
            if(flag==0)
            {
                n--;
            }
        }
        turn=turn^1;
    }
    if(turn==0){cout<<"FastestFinger"<<endl;}
    else
    {
        cout<<"Ashishgup"<<endl;
    }

}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    if(n%2==1)
    {
        if(n==1){cout<<"FastestFinger"<<endl;}
        else
        {
            cout<<"Ashishgup"<<endl;
        }
    }
    else
    {
        if(n==2){cout<<"Ashishgup"<<endl;continue;}
        int ct=n;
        int k=0;
        while(ct%2!=1)
        {
            ct/=2;
            k++;
        }
        if(ct==1){cout<<"FastestFinger"<<endl;continue;}
        if(isPrime(ct))
        {
            if(k>1)
            {
                cout<<"Ashishgup"<<endl;
            }
            else
            {
                cout<<"FastestFinger"<<endl;
            }
        }
        else
        {
            if(k>1)
            {
                cout<<"FastestFinger"<<endl;
            }
            else
            {
                cout<<"Ashishgup"<<endl;
            }
        }
    }
}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    if(n%2==1)
    {
        if(n==1){cout<<"FastestFinger"<<endl;}
        else
        {
            cout<<"Ashishgup"<<endl;
        }
    }
    else
    {
        if(n==2){cout<<"Ashishgup"<<endl;continue;}
        int ct=n;
        int k=0;
        while(ct%2!=1)
        {
            ct/=2;
            k++;
        }
        if(ct==1){cout<<"FastestFinger"<<endl;continue;}
        if(isPrime(ct))
        {
            if(k>1)
            {
                cout<<"Ashishgup"<<endl;
            }
            else
            {
                cout<<"FastestFinger"<<endl;
            }
        }
        else
        {
            cout<<"Ashishgup"<<endl;
        }
    }
}
return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pi (3.141592653589)
#define mod 1000000007
#define int long long
#define float double
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(c) c.begin(), c.end()
#define min3(a, b, c) min(c, min(a, b))
#define min4(a, b, c, d) min(d, min(c, min(a, b)))
#define fr(i, n) for(int i=n-1;i>=0;i--)
#define fo(i,n) for(int i=0;i<n;i++)
#define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);

int32_t main(){
fast

// Fuck Ratings, I'm in Love with Experience.
// Once a Charas, Always a CHARAS.
int t;
cin>>t;
while(t--){
    int n;
    cin>>n;
    if(n%2==1)
    {
        if(n==1)
        {
            cout<<"FastestFinger"<<endl;
        }
        else
        {
            cout<<"Ashishgup"<<endl;
        }
    }
    else if(n==2)
    {
        cout<<"Ashishgup"<<endl;
    }
    else if(n==4 || n==6 || n==8 ||n==10)
    {
        cout<<"FastestFinger"<<endl;
    }
    else
    {
        if(n%4==0 || n%6==0 || n%8==0 || n%10==0)
        {
            int flag=1;
            if(n%4==0){if((n/4)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            else if(n%6==0){if((n/6)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            else if(n%8==0){if((n/8)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            else if(n%10==0){if((n/10)%2==1){cout<<"Ashishgup"<<endl;flag=0;}}
            else
            {
                cout<<"FastestFinger"<<endl;
                flag=0;
            }
            if(flag==1)
            {
                cout<<"FastestFinger"<<endl;
            }
        }
        else
        {
            cout<<"FastestFinger"<<endl;
        }

    }

}
return 0;
}