
//→__int128_tを使う&GNU C++17 (64)で提出する

//インクルードなど
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

//イテレーション
#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)
//x:コンテナ
#define ALL(x) x.begin(),x.end() 
#define SIZE(x) ll(x.size()) 
//定数
#define INF32 2147483647 //2.147483647×10^{9}:32bit整数のinf
#define INF64 9223372036854775807 //9.223372036854775807×10^{18}:64bit整数のinf
#define MOD 1000000007 //問題による
//略記
#define F first
#define S second
//出力(空白区切りで昇順に)
#define coutALL(x) for(auto i=x.begin();i!=--x.end();i++)cout<<*i<<" ";cout<<*--x.end()<<endl;

//aをbで割る時の繰上げ,繰り下げ
ll myceil(ll a,ll b){return (a+(b-1))/b;}
ll myfloor(ll a,ll b){return a/b;}


long long comb(int n, int r) {
    if(r > n - r) r = n - r; // because C(n, r) == C(n, n - r)
    long long ans = 1;
    int i;

    for(i = 1; i <= r; i++) {
        ans *= n - r + i;
        ans /= i;
    }

    return ans;
}

signed main(){

	ll a,b,k;
	cin >> a >> b >> k;
	ll c;
	ll n=a+b;
	k--;
	for(ll i=0;i<n;i++){
		if(a>0){
			c=comb(a+b-1,b);
			if(k<c){
				cout << "a";
				a--;
			}
			else {
				cout << "b";
				k -= c;
				b--;
			}
		}
		else {
			cout << 'b';
			b--;
		}
	}
	cout << endl;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define pb push_back
#define eb emplace_back
#define sz(x) (int)(x).size()
#define rng(v) v.begin(),v.end()
#define rngr(v) v.rbegin(),v.rend()
const long long INF = 1LL << 60;
using namespace std;
using ll = long long;
using P = pair<int, int>;
using LP = pair<ll, ll>;
using P3 = tuple<int, int, int>;
#define vi vector<int>
#define vvi vector<vi>
#define vll vector<ll>
#define vs vector<string>
using vp = vector<P>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
using CP = complex<double>;
double dot( const CP &z, const CP &w ){ return (z.real()*w.real() + z.imag()*w.imag()); }
double cross( const CP &z, const CP &w ){ return (z.real()*w.imag() - z.imag()*w.real()); }

int n;
string s, x;
vvi memo;
bool dp(int i = 0, int r = 0){
    if(memo[i][r] != -1) return memo[i][r] ;
    if(i == n) return r==0;
    int a = s[i]-'0';
    int b = ((r*10+a)%7), c = ((r*10)%7);
    if(memo[i+1][b] == -1) memo[i+1][b]  = dp(i+1, b);
    if(memo[i+1][c] == -1) memo[i+1][c]  = dp(i+1, c);
    if(x[i] == 'A'){
        return memo[i+1][b] && memo[i+1][c];
        //return (dp(i+1, (r*10+a)%7)) && (dp(i+1, (r*10)%7));
    }else{
        return memo[i+1][b] || memo[i+1][c];
        //return (dp(i+1, (r*10+a)%7)) || (dp(i+1, (r*10)%7));
    }
}
int main()
{
    cin >> n >> s >> x;
    memo.resize(n+1, vi(7, -1));
    if(dp()) cout << "Takahashi" << endl;
    else cout << "Aoki" << endl;
    return 0;
}