#include <iostream>
#include <cstdio>

int main()
{
	int n; scanf("%d", &n);
	int ans = 0;
	for(int i = 1; i <= n; i++)
	{
		int x, k; scanf("%d%d", &x, &k);
		while(x % k) x -= ((x % k) / (x / k + 1) + ((x % k) % (x / k + 1) != 0)) * (x / k + 1);
		ans ^= x / k; 
	}
	if(ans) printf("Takahashi");
	else printf("Aoki"); 
}