In a stone-taking game, Takahashi and Aoki take turns removing stones from piles. Each pile has a specific number of stones and an associated integer. Players can remove a certain number of stones from a pile based on its associated integer. The first player unable to make a move loses. Given optimal play, determine the winner. Constraints: 1 ≤ N ≤ 200, 1 ≤ A_i, K_i ≤ 10^9. Input format: N, A_1, K_1, ..., A_N, K_N. Output "Takahashi" if Takahashi wins, "Aoki" if Aoki wins. Examples: (1) 2 piles with 5 stones, associated with 2, and 3 stones, associated with 3. Aoki wins. (2) 3 piles with 3, 4, and 5 stones, associated with 2, 3, and 1. Takahashi wins. (3) 3 piles with 28, 16, and 19 stones, associated with 3, 4, and 2. Aoki wins. (4) 4 piles with specific stone counts and associated integers. Takahashi wins.

# Buggy version:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
data = list(map(int,read().split()))

def calc_g(x,k):
    while(x>=k):
        if(x%k==0):
            return x//k
        fn = x//k
        x1 = x - fn + 1
        x2 = fn*k + (x%k)%(fn+1)
        x = min(x1,x2)
    return 0

grundy = 0
it = iter(data)
for a,k in zip(it,it):
    grundy = grundy ^ calc_g(a,k)

if(grundy==0):
    print('Aoki')
else:
    print('Takahashi')

# Fixed version:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
data = list(map(int,read().split()))

def calc_g(x,k):
    while(x>=k):
        if(x%k==0):
            return x//k
        fn = x//k
        x1 = x - (fn + 1)
        x2 = fn*k + (x%k)%(fn+1)
        x = min(x1,x2)
    return 0

grundy = 0
it = iter(data)
for a,k in zip(it,it):
    grundy = grundy ^ calc_g(a,k)

if(grundy==0):
    print('Aoki')
else:
    print('Takahashi')

# Buggy version:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7



def solve(n, k):
    if n % k == 0:
        return n // k
    diff = (n // k) + 1
    target = n - n % k
    r = n % k
    if r % diff == 0:
        return solve(n - r, k)
    n -= r // diff * diff
    return solve(n, k)


n = I()
ret = 0
for i in range(n):
    a, k = LI()
    ret ^= solve(a, k)

print("Takahashi" if ret else "Aoki")


# Fixed version:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7



def solve(n, k):
    if n % k == 0:
        return n // k
    diff = (n // k) + 1
    target = n - n % k
    if (n - target) % diff == 0:
        return solve(target, k)
    n -= -((-(n - target)) // diff) * diff
    return solve(n, k)


n = I()
ret = 0
for i in range(n):
    a, k = LI()
    ret ^= solve(a, k)

print("Takahashi" if ret else "Aoki")

# Buggy version:
import sys
input = sys.stdin.readline

N = int(input())
AK = [list(map(int, input().split())) for _ in range(N)]
# N = 25
# AK = [(i+1, 3) for i in range(N)]

def grundy(A, K):
    if K == 1:
        return A
    X = (A+K-1)//K
    num = X*K - A
    while X*K-num > K*K:
        if num%K == 0:
            return X - num//K
        if num//K == X//K:
            num = (num%K-1)
        else:
            num = X%K+1 + (K-1)*(num//K) + (num%K-1)
        X = X - X//K
    
    S = X*K - num
    while S >= K:
        if S%K == 0:
            return S//K
        delta = S//K + 1
        S -= ((S%K)//delta)*delta
    return 0
    
g = 0
for A, K in AK:
    #print(A, grundy(A, K))
    #print()
    g ^= grundy(A, K)

print("Takahashi" if g else "Aoki")

# Fixed version:
import sys
input = sys.stdin.readline

N = int(input())
AK = [list(map(int, input().split())) for _ in range(N)]
# N = 40
# AK = [(i+1, 4) for i in range(N)]

def grundy(A, K):
    if K == 1:
        return A
    X = (A+K-1)//K
    num = X*K - A
    while X*K-num > K*K:
        #print(X, num)
        if num%K == 0:
            return X - num//K
        if num//K == X//K:
            num = num%K
        else:
            num = X%K+1 + (K-1)*(num//K) + (num%K-1)
        X = X - X//K
    
    S = X*K - num
    while S >= K:
        if S%K == 0:
            return S//K
        delta = S//K + 1
        S -= max(((S%K)//delta)*delta, delta)
    return 0
    
g = 0
for A, K in AK:
    # print(A, A//K, grundy(A, K))
    # print()
    g ^= grundy(A, K)

print("Takahashi" if g else "Aoki")

# Buggy version:
def main():
    n = int(input())
    res = 0

    for (a, k) in [[int(x) for x in input().split()] for _ in range(n)]:
        while a >= k:
            m, u = a // k, (a - k * m)
            if a % k == 0 or (a % k) % (m + 1) == 0:
                res ^= m
                break
            x = u // (m + 1)
            a -= (x + 1) * (m + 1)

    print('Takahashi' if res != 0 else 'Aoki')


if __name__ == "__main__":
    main()


# Fixed version:
def main():
    n = int(input())
    res = 0
    for (a, k) in [map(int, input().split()) for _ in range(n)]:
        while a >= k:
            m = a // k
            if a % k == 0:
                res ^= m
                break
            x = (a - k * m - 1) // (m + 1)
            a -= max(1, x) * (m + 1)
    print('Takahashi' if res != 0 else 'Aoki')


if __name__ == '__main__':
    main()