#include <bits/stdc++.h>

int cal(int n,int k)
{
	while(n>=k&&n%k!=0) {
		int div = n/k+1;
		n -= ((n-1)%k/div+1)*div;
	}
	return n/k;
}
int n;
int main()
{
	scanf("%d",&n);
	int val = 0;
	for(int i = 0;i < n;++i) {
		int a,b;
		scanf("%d%d",&a,&b);
		val ^= cal(a,b);
	}
	if(val > 0) {
		printf("Takahashi\n");
	} else {
		printf("Aoki\n");
	}
}
