#include <bits/stdc++.h>

using namespace std;

int main()
{
	int n, r = 0;
	cin >> n;
	for (int i = 0; i < n; i++) {
		int a, k;
		cin >> a >> k;
		for (;;) {
			int b = a % k % (a / k + 1);
			if (!b) break;
			a += b - a / k - a % k - 1;
		}
		r ^= a / k;
	}
	cout << (r ? "Takahashi" : "Aoki") << endl;
	return 0;
}
