#include<bits/stdc++.h>
using namespace std;
int main(){
	int res=0;int n;scanf("%d",&n);
	for(int i=1,x,y;i<=n;++i){
		scanf("%d%d",&x,&y);
		while(x%y)x=x-(x/y+1)*((x-x/y*y-1)/(x/y+1)+1);res^=x/y;
		// cout<<res<<
	}cout<<(res?"Takahashi":"Aoki");
	return 0;
}