#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#define lol(i,n) for(int i=0;i<n;i++)
#define mod 100000007
typedef long long ll;
using namespace std;
ll G(ll x,ll k){
    if(x%k==0)return x/k;
    ll s=x/k+1,m=x-x%k;
    ll d=((x-m)/s+!!((x-m)%s));
    ll p=x-s*d;
    return G(p,k);
}
int main(){
    int n;cin>>n;
    ll ans=0;
    lol(i,n){
	ll a,k;cin>>a>>k;
	ans^=G(a,k);
    }
    cout<<(ans?"Takahashi":"Aoki")<<endl;
    return 0;
}
