#include<cstdio>
#include<algorithm>
using namespace std;
int n;
int f(int x,int k)
{
	if(x%k==0)return x/k;
	int t=x%k;
	int haha=max(1,t/((x/k)+1));
	return f(x-haha*((x/k)+1),k);
}
int main()
{
	int ans=0;
	scanf("%d",&n);
	int x,y;
	while(n--)
	{
		scanf("%d%d",&x,&y);
		ans^=f(x,y);
	}
	printf("%s\n",ans==0?"Aoki":"Takahashi");
}