#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <random>
#include <chrono>
#include <bitset>

using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define int long long
typedef long long ll;
typedef long double ld;
#define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);

const ll SIZE = 1e5 + 100, INF = 1e9 + 1, MOD = 1e6 + 7;

ll dist[SIZE];
vector<pair<ll, ll>> vec;

void input() {
    ll n;
    cin >> n;
    for (int i = 0; i < n; i++) {
        ll x, k;
        cin >> x >> k;
        vec.push_back({ x, k });
    }
}

void test() {
    ll n = rng() % 10 + 1;

    vec.clear();
    for (int i = 0; i < n; i++) {
        ll x, k;
        x = rng() % MOD + 1; k = rng() % MOD + 1;
        vec.push_back({ x, k });
    }
}

ll brute() {
    ll ans = 0;
    for (int i = 0; i < vec.size(); i++) {
        vector<ll> curMx(vec[i].first + 1);

        for (int j = 0; j <= vec[i].first; j++) {
            vector<ll> s;
            ll dis = j / vec[i].second;
            for (int t = 1; t <= dis; t++) {
                s.push_back(curMx[j - t]);
            }
            s.push_back(INF);
            sort(s.begin(), s.end());
            ll pr = -1;
            for (int i = 0; i < s.size(); i++) {
                if (pr + 1 >= s[i]) {
                    pr = s[i];
                    continue;
                }

                curMx[j] = pr + 1;
                break;
            }

            //cout << curMx[j] << " ";
        }

        ans ^= curMx[vec[i].first];
        /*cout << "\n";

        for (int j = 0; j < vec[i].second; j++) {
            cout << j << "\n";
            for (int t = 0; t <= vec[i].first; t++) {
                if (t % vec[i].second == j) cout << curMx[t] << " ";
            }
            cout << "\n";
        }*/
        /*vector<vector<ll>> vc(vec[i].first + 1);

        for (int j = 0; j <= vec[i].first; j++) {
            vc[curMx[j]].push_back(j);
        }
        for (int i = 0; i < vc.size(); i++) {
            cout << i << "\n";
            for (auto cur : vc[i]) cout << cur << " ";
            cout << "\n";
        }*/
    }

    /*cout << ans << "\n";*/

    return ans;
}

ll sol() {
    ll ans = 0;
    for (int i = 0; i < vec.size(); i++) {
        ll cur = vec[i].first;
        while (cur % vec[i].second != 0) {
            ll dis = cur / vec[i].second + 1;

            ll l = -1, r = INF;

            ll q = (cur % vec[i].second);

            bool flag2 = false;
            if (q % dis == 0) {
                ll needed = q / dis;
                needed--;
                if (((cur - needed * dis) / vec[i].second + 1) == dis) {
                    cur -= needed * dis;
                    cur -= dis;
                    flag2 = true;
                }
            }
            if (!flag2) {
                while (r - l > 1) {
                    ll mid = (l + r) / 2;
                    if (cur - (dis * mid) < 0) {
                        r = mid;
                        
                    }
                    else {
                        if ((cur - (dis * mid)) / vec[i].second + 1 >= dis) {
                            l = mid;
                        }
                        else {
                            r = mid;
                        }
                    }
                }
                cur -= dis * r;
            }
        }

        ans ^= (cur / vec[i].second);
    }


    return ans;
}

ll sol2() {
    ll ans = 0;
    for (int i = 0; i < vec.size(); i++) {
        ll cur = vec[i].first;
        while (cur % vec[i].second != 0) {
            ll dis = cur / vec[i].second + 1;

            ll l = 0, r = INF;

            cur -= dis;
        }

        ans ^= (cur / vec[i].second);
    }

    return ans;
}
signed main()
{
    fastInp;

    ll t = 1;

    while (t--) {
        /*for (int i = 1; i <= 10000; i++) {
            for (int j = 1; j <= 10000; j++) {
                vec.clear();
                vec.push_back({ i, j });
                ll q2 = sol();
                ll q = sol2();
                if (q2 != q) {
                    cout << "";
                }
            }
            cout << i << " ";
        }*/
        input();
        ll q = sol();

        if (q == 0) {
            cout << "Aoki";
        }
        else {
            cout << "Takahashi";
        }
    }

    return 0;
}

Measured memory_bytes: 3128