#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vll;
typedef vector<pair<int,int> > vpii;
typedef vector<vector<int> > vvi;
typedef vector<vector<char> > vvc;
typedef vector<vector<string> > vvs;
typedef vector<vector<ll> > vvll;
#define Rep(i,n) for(ll i=0;i<ll(n);i++)
#define Repd(i,n) for(ll i=n-1;i>=0;i--)
#define For(i,a,b) for(ll i=a;i<=ll(b);i++)
#define Ford(i,a,b) for(ll i=a;i>=ll(b);i--)
#define Fora(i,I) for(const auto& i:I)
#define Sort(a) sort(a.begin(), a.end())
const int INF = 1<<30;
const ll MOD = 1000000007;
const ll val = 0;
ll myceil(ll a,ll b){return (a+(b-1))/b;}
ll myfloor(ll a,ll b){return a/b;}



int main(void) {
    int ans,x,y,z;
    cin>>x>>y>>z;
    float takahashi = (float)y / x;
    ans = takahashi * z;
    if(takahashi*z == (float)ans) {
        --ans;
    }
    cout<<ans<<endl;
}
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define pll  pair <long long,long long>
#define ss second
#define ff first
#define inf (ll)2e18
#define mod 1000000007
//#define mod 998244353
#define ld long double
#define fast  ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n"
const ll N=200005 ;
ll dp[N][7],n ;
string s,x ;
ll solve(ll id,ll rem)
{
	if(id==n)
	{
		if(rem==0) return 1;
		return 0 ;
	}
	else if(dp[id][rem]!=-1) return dp[id][rem] ;
	else
	{
		ll ans ;
		if(x[id]=='A')
		{
			ans=1 ;
			ans&=solve(id+1,(10*rem)%7) ;
			ans&=solve(id+1,(rem*10+s[id]-'0')%7) ;
		}
		else
		{
			ans=0 ;
			ans|=solve(id+1,(10*rem)%7) ;
			ans|=solve(id+1,(rem*10+s[id]-'0')%7) ;
		}
	    //cout<<id<<" "<<rem<<ans<<endl ;
		return dp[id][rem]=ans ;
	}
}
int main()
{
	fast ;
	cin>>n>>s>>x ;
	for(ll i=0;i<N;i++) for(ll j=0;j<7;j++) dp[i][j]=-1 ;
	
	if(solve(0,0)) cout<<"Takahashi" ;
	else cout<<"Aoki" ;
	
}

