//grundy(n) = grundy(n-n/k-1)
// khong biet chung minh
//khao sat ket qua

#include <bits/stdc++.h>

using namespace std;

int n,res;

int cal(int n,int k) {
    if (n<k) return 0;
    if (n%k==0) return n/k;
    int dif = n/k + 1;
    return cal(n - max(1,(n%k)/dif) * dif,k);
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin>>n;
    for (int i=1;i<=n;i++) {
        int x,k;
        cin>>x>>k;
        res^=cal(x,k);
        //cout<<cal(x,k)<<endl;
    }
    if (res) cout<<"Takahashi";
    else cout<<"Aoki";
}
