#include<bits/stdc++.h>
using namespace std;
int a,b,c,mod=4;
long long mypow(long long x,long long times){
	if(times==0)return 1;
	long long ret=mypow(x,times/2);ret=ret*ret%mod;
	if(times%2)ret=ret*x%mod;return ret;
}
bool vis[10];
int x[4];
int main(){
	cin>>a>>b>>c;a%=10; 
	int qaq;
	if(a==1){cout<<1;return 0;}
	if(a==0){cout<<0;return 0;}
	if(a==5){cout<<5;return 0;}
	x[1]=a;for(int i=2;i<=4;i++)x[i%4]=x[i-1]*a%10;
	cout<<x[mypow(b,c)];
}
//OM TAT SAT
#include<bits/stdc++.h>
using namespace std;
int main()
{

    int a,b,c;
    cin>>a>>b>>c;
    if(c==0 && a>b)
    {
    cout<<"Takahashi"<<endl;
    }
    else if(c==0 &&a<=b)
    {
    cout<<"Aoki"<<endl;
    }
    else if(c==1 && a<b)
    {
     cout<<"Aoki"<<endl;
    }
    else if(c==1 &&a>=b)
    {
     cout<<"Takahashi"<<endl;
    }

}
