#include <iostream>
#include <algorithm>

using namespace std;

int get(int a, int k){
	while(a % k != 0){
		int c = a / k + 1;
		int l = a / k * k;
		a -= (a - l + c - 1) / c * c;
	}
	return a / k;
}

int main(){
	int n;
	cin >> n;

	int res = 0;

	for(int i=0; i<n; i++){
		int a, k;
		cin >> a >> k;

		int key = get(a,k);
		//cout << key << endl;
		res ^= key;
	}

	if(res == 0){
		cout << "Aoki" << endl;
	}else{
		cout << "Takahashi" << endl;
	}

	return 0;
}
