#include <iostream>
#include <set>

using namespace std;

int n;
int a[205], k[205];
int dp[50];

int calc(int n, int k)
{
	if(n/k == 0) return 0;
	if(n % k) return calc(n-n/k-1, k);
	else return n/k;
}

int main(void)
{
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> a[i] >> k[i];
	
	int ans = 0;
	for(int i = 1; i <= n; i++){
		ans ^= calc(a[i], k[i]);
	}
	
	if(ans) cout << "Takahashi" << endl;
	else cout << "Aoki" << endl;
	
	return 0;
}