n=int(input()) a=[0]*n for i in range(n): a[i]=int(input()) grundy=[-1]*(n+1) grundy[n]=0 for i in range(n-1,-1,-1): mex=set() xor=0 for j in range(i,n): xor^=a[j] mex.add(xor^grundy[j+1]) g=0 while g in mex: g+=1 grundy[i]=g if grundy[0]==0: print('Takanashi') else: print('Takahashi')