#include<bits/stdc++.h>
using namespace std;
int calc(int a,int k){
	//cout<<a<<" "<<k<<endl;
	if(a < k) return 0;
	if(a % k == 0) return a / k;
	int tmp = a / k + 1,t2 = a / k * k;
	int t3 = a % tmp,t4 = t2 % tmp;
	int t5 = t4 - t3;
	if(t5 < 0) t5 += tmp;
	return calc(t2 - t5,k);
}
int main(){
	int ans = 0,n,i,a,k;
	scanf("%d",&n);
	for(i = 1;i <= n;++i){
		scanf("%d%d",&a,&k);
		ans ^= calc(a,k);
		//cout<<calc(a,k)<<endl;
	}
	if(ans) puts("Takahashi");
	else puts("Aoki");
	return 0;
}