#include<algorithm>
#include<cstdio>
#include<cstring>
#include<map>
#define ll long long
#define N 105
using namespace std;
int n,x,y,ans;
int did(int x,int y)
{
	if (!(x%y))
		return x/y;
	int k=x/y+1;
	return did(x-max(x%y/k,1)*k,y);
}
int main()
{
	scanf("%d",&n);
	while (n--)
		scanf("%d%d",&x,&y),ans^=did(x,y);
	(ans)?printf("Takahashi"):printf("Aoki");
} 