#include<bits/stdc++.h>
using namespace std;
int Grundy(int N, int K) {
  if(N%K==0) return N/K;
  auto d = (N+K-1)/K;
  auto r = N%K;
  auto n = r/d;
  return Grundy(N-max(1,n)*d, K);
}
int main() {
  int N;
  cin >> N;
  int g = 0;
  for(auto i=0; i<N; ++i) {
    int A, K;
    cin >> A >> K;
    g ^= Grundy(A, K);
  }
  cout << (g ? "Takahashi" : "Aoki") << endl;
}
