#include<bits/stdc++.h>
#define ll long long
using namespace std;
int n,x,y,ans;
int get(int x,int y){while (1){if(!(x%y))return x/y;x-=(x-(x/y)*y)/(x/y+1)*(x/y+1);if(!(x%y))return x/y;x-=(x/y+1);}}
int main(){
	cin>>n;
	for (int i=1;i<=n;i++){cin>>x>>y;ans^=get(x,y);}
	if (ans)puts("Takahashi");else puts("Aoki");
	return 0;
}