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

typedef long long ll;

int N;

ll unit(ll x,ll k)
{
    if(x % k == 0)return x / k;
    ll xx = (x / k) * k;
    x = xx + (x - xx) % ((x / k) + 1);
    if(x % k == 0)return x / k;
    return unit(x - (x / k) - 1,k);
}

int main()
{
    scanf("%d",&N);
    ll mem = 0;
    for(int i = 0; i < N; i++)
    {
        ll x,k;
        scanf("%lld%lld",&x,&k);
        mem ^= unit(x,k);
    }
    if(mem)printf("Takahashi\n");
    else printf("Aoki\n");
    return 0;
}
