#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
typedef long long int lli;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<pll> vop;
typedef vector<ll> vl;
typedef vector<vl> vvl;
#define REP(i,a,b) for(long long int i=a;i<b;i++)
#define REPR(i,a,b) for(long long int i=a;i>=b;i--)
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define all(x) (x).begin(),(x).end()
#define endl "\n"
#define mem(a,b) memset(a,b,sizeof(a))
#define mod 1000000007
#define MAX LLONG_MAX
const int mxn=2e5+5;
#define INF 1e18
//----------------------------------------------------------------------------------------
//lower_bound returns an iterator pointing to the first ele. which has a value not less than ‘val
#define LB(arr,n) ll c=0;it=lower_bound(arr.begin(),arr.end(),n);if(it==arr.end()){c=1;}
//define it and if c==1 means not found
#define LB1(arr,n) ll idx=it-arr.begin();if(arr[idx]==n){ idx=idx;}else{idx=idx-1;}
// here idx holds the index( 0 based) of found element
//-----------------------------------------------------------------------------------------
//upper_bound returns an iterator pointing to the first ele. which has a value greater than ‘val’.
#define UB(arr,n) ll c=0;it=upper_bound(arr.begin(),arr.end(),n);if(it==arr.end()){c=1;}
#define UB1(arr,n) ll idx=it-arr.begin();
//-----------------------------------------------------------------------------------------
 
ll power(ll a,ll b,ll m) { ll ans=1; while(b) { if(b&1) ans=(ans*a)%m; b/=2; a=(a*a)%m; } return (ans+m)%m; }
 
ll lcm(ll a, ll b) { return (a*b)/__gcd(a, b); }
 
ll modInverse(ll a, ll m) { ll g = __gcd(a, m); return power(a, m-2, m); } 
 
bool cmp(pair<int ,int > &a,pair<int ,int > & b){
    if(a.second!=b.second){
        return a.first<b.first;
    }
    else{
        return a.second<b.second;
    }
}
//prime factors of 10^18
vector<long long int> genfactors(long long int n){
    vector<long long int> res; 
    long long int val = 2;
    for(long long int i = 2; i*i <= n ; ++i){
        while(n%i == 0){
            res.push_back(i);
            n/=i;
        }
    }
    if(n > 1) res.push_back(n);
    return res;
}
//--------------------------------------------------------------------------------------------


void solve(){
	ll n,k,m;
	ll a,b,c;
	cin>>a>>b>>c;
	if(c==0){
		if(a<=b)cout<<"Aoki"<<endl;
		else cout<<"Takahashi"<<endl;
	}
	else {
		if(a>=b)cout<<"Takahashi"<<endl;
		else cout<<"Aoki"<<endl;
	}

}
int main()
{
    fastIO;
    ll t=1;
    //cin >> t;
    while(t--)
    {
        solve();

	}
    return 0;
}
 
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(firstsecond) '(' << first< ',' << second< ')'
constexpr ll MOD = 1000000007;
//constexpr ll MOD = 998244353;
ll INF = 1001001001001001001;
long double EPS = 1e-8;
long double PI = 3.141592653589793238;
template <typename T>
void remove(std::vector<T> &vector, unsigned int index)
{
   vector.erase(vector.begin() + index);
}

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

using Graph = vector<vector<pair<ll,ll>>>;


const unsigned long long int cycle_per_sec = 2800000000;
 
unsigned long long int getCycle(){
    unsigned int low, high;
    __asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
    return ((unsigned long long int)low) | ((unsigned long long int)high << 32);
}

double getTime (unsigned long long int begin_cycle) {
    return (double)(getCycle() - begin_cycle) / cycle_per_sec;
}

auto start_cycle = getCycle();
random_device seed_gen;
mt19937_64 rnd(seed_gen());

ll range_rand(ll a,ll b){
    uniform_int_distribution<ll> dist_res(a,b);
    return dist_res(rnd);
}



// MOD確認

constexpr long double start_temp = 100,end_temp = 30,TIME_LIMIT = 2.0;

ll dx[4]{-1,0,1,0};
ll dy[4]{0,-1,0,1};
char D[4]{'L','U','R','D'};

ll N = 50,SX,SY;
ll feild[60][60];
ll point[2510];
ll done[2510];

string ans_command = "";
ll ans_score = 0;

bool in_range(ll x,ll y){
    return (0 <= y && y < N && 0 <= x && x < N);
}

void dfs(ll now_y,ll now_x,ll now_score,string now_command){
    ll now_tile = feild[now_y][now_x];
    ll p = point[now_tile];
    done[now_tile] = 1;
    now_score += p;
    if(!in_range(now_y,now_x)){
        cout << "BAD" << endl;
    }
    if(now_score > ans_score){
        ans_score = now_score;
        ans_command = now_command;
    }
    if(getTime(start_cycle) > TIME_LIMIT) return;
    rep(i,4){
        ll next_y = now_y + dy[i],next_x = now_x + dx[i];
        ll next_tile = feild[next_y][next_x];
        if(!in_range(next_y,next_x) || done[next_tile]) continue;
        string next_command = now_command + D[i];
        dfs(next_y,next_x,now_score,next_command);
    }
    done[now_tile] = 0;
    now_score -= p;
    return ;
}

int main(){
    cin >> SY >> SX;
    rep(i,N) rep(j,N) cin >> feild[i][j];
    rep(i,N) rep(j,N){
        ll p;
        cin >> p;
        point[feild[i][j]] += p;
    }
    start_cycle = getCycle();
    dfs(SY,SX,0,"");
    cout << ans_command << endl;
}