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

ll rec(ll A, ll K) {
    if (A < K) return 0;
    if (A%K == 0) return A/K;
    if (A/K < K) {
        ll L = A/K+1;
        if ((A%K)%L == 0) return A/K;
        else return rec(A-A%K/L*L-L, K);
    }
    return rec(A-A/K-1, K);
}

int main() {
    int N;
    cin >> N;
    ll grundy = 0;
    for (int i = 0; i < N; i++) {
        ll A, K;
        cin >> A >> K;
        grundy ^= rec(A, K);
    }
    cout << ((grundy == 0) ? "Aoki" : "Takahashi") << endl;
    return 0;
}
