{-# LANGUAGE ScopedTypeVariables #-}

import Data.Bits
import Control.Monad


rgl :: (Read a) => IO a
rgl = (liftM read) getLine

f :: Int -> Int -> Int
f x k = if x < k 
                then 0
                else if r == 0
                        then v
                        else f (y - r2 + r2 `mod` (v2 + 1)) k
                        where 
                                v = div x k
                                r = mod x k
                                y = x - v - 1
                                v2 = div y k
                                r2 = mod y k
                                                                

main = do
        n :: Int <- rgl
        xs :: [(Int, Int)] <- replicateM n $ do
                                        [a, b] <- (liftM words) getLine
                                        return (read a, read b)
        let     vals = map (uncurry f) xs
                ans  = foldl xor 0 vals

        putStrLn $ if ans == 0
                        then "Aoki"
                        else "Takahashi"
