import std.stdio;
import std.algorithm;
import std.range;
import std.conv;
import std.string;

int f(int a, int k) {
    if (a < k) return 0;
    if (a%k == 0) return a/k;
    int c = a/k+1;
    int l = a/k*k;
    a -= ((a-l)/c+1)*c;
    return f(a, k);
}

void main() {
    int n = to!int(chomp(readln()));
    //int m = 100;
    //int[] dp = new int[m+1];
    //foreach (i; 0..m+1) {
    //    int[] s = new int[m+1];
    //    foreach (j; 1..i/n+1) {
    //        s[dp[i-j]] = 1;
    //    }
    //    foreach (j; 0..m) {
    //        if (s[j] == 1) continue;
    //        dp[i] = j;
    //        break;
    //    }
    //    writefln("%2d : %2d - %2d", i, dp[i], f(i,n));
    //}
    int x = 0;
    foreach (i; 0..n) {
        string[] input = split(readln());
        int a = to!int(input[0]);
        int k = to!int(input[1]);
        x ^= f(a,k);
    }
    writeln(x ? "Takahashi" : "Aoki");
}