#include<bits/stdc++.h>
#define ll long long
#define mo 1000000007
using namespace std;
int n,x,y,ans;
int main(){
	scanf("%d",&n);
	while (n--){
		int x,y;
		scanf("%d%d",&x,&y);
		for (;x%y&&x>=y;){
			int v1=x%y,v2=x/y+1;
			x-=v2*(v1/v2);
			if (!(x%y)) break;
			x-=x/y+1;
		};
		ans^=x/y;
	} 
	puts(ans?"Takahashi":"Aoki");
}