#include <cstdio>

using namespace std;

int main() {
  int n;
  scanf("%d", &n);
  int xr = 0;
  for (int i = 0; i < n; ++i) {
    int a, b;
    scanf("%d %d", &a, &b);
    while (a > b && a % b != 0) {
      int q = a / b;
      int x = (a - b * q) / (q + 1);
      if ((a - (q + 1) * x) % b != 0) {
        ++x;
      }
      a -= (q + 1) * x;
    }
    xr ^= a / b;
  }
  puts(xr != 0 ? "Takahashi" : "Aoki");
}
