#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using namespace std;

ll grundy(ll a, ll k){
    if(a < k) return 0;
    if(a%k == 0) return a/k;
    return grundy(a-((a-a/k*k-1)/(a/k+1)+1)*(a/k+1), k);
}

int main(){
    ll n; cin >> n;
    ll ans = 0;
    rep(i,n){
        ll a, k; cin >> a >> k;
        ans ^= grundy(a, k);
    }
    cout << (ans ? "Takahashi" : "Aoki") << endl;
    return 0;
}