#include<bits/stdc++.h>
#define pb emplace_back
#define AI(i) begin(i), end(i)
using namespace std;
using ll = long long;
template<class T>
bool chmax(T &val, T nv) { return val < nv ? (val = nv, true) : false; }
template<class T>
bool chmin(T &val, T nv) { return nv < val ? (val = nv, true) : false; }
#ifdef KEV
#define DE(args...) kout("[ " + string(#args) + " ] = ", args)
void kout() {cerr << endl;}
template<class T1, class ...T2>
void kout (T1 v, T2 ...e) { cerr << v << ' ', kout(e...); }
template<class T>
void debug(T L, T R) { while (L != R) cerr << *L << " \n"[next(L)==R], ++L; }
#else
#define DE(...) 0
#define debug(...) 0
#endif
// What I should check
// 1. overflow
// 2. corner cases
// Enjoy the problem instead of hurrying to AC
// Good luck !
const int MAX_N = 300010;

ll dfs(ll v, ll k) {
	static map<ll,ll> dp[100];
	if (k == 0) return abs(v);

	if (dp[k].count(v)) return dp[k][v];

	ll ad = 1ll << k;


	if (abs(v) >= 2 * ad) return abs(v);

	ll &ret = dp[k][v] = abs(v);

	chmin(ret, 0 + dfs(v, k-1));
	DE(v, k, ret);
	chmin(ret, 1 + dfs(v-ad, k-1));
	DE(v, k, ret);
	chmin(ret, 1 + dfs(v+ad, k-1));
	DE(v, k, ret);

	assert(ret >= 0);

	return ret;
}

ll solve(ll v, ll k) {
	if (k == 0) return abs(v);

	ll ad = 1ll << k;

	ll d = v / ad;

	ll ret = abs(v);

	DE(v, k);

	chmin(ret, abs(d) + dfs(v - d * ad, k));

	cerr << "Sv ", DE(v, k, ret);
	chmin(ret, abs(d+1) + dfs(v - (d+1) * ad, k));
	cerr << "Sv ", DE(v, k, ret);
	if (d)
	chmin(ret, abs(d-1) + dfs(v - (d-1) * ad, k));
	cerr << "Sv ", DE(v, k, ret);

	return ret;
}
int32_t main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	ll x, y;
	cin >> x >> y;

	ll res = abs(x - y);

	for (int k = 1;; ++k) {
		x *= 2;

		ll sv = solve(y - x, k);
		DE(k, y - x, sv);
		chmin(res, sv + k);

		if (x > y) break;
	}

	cout << res << '\n';
}

#include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
#define int long long

int h, w;

bool is_in(int i, int j){
    return 0 <= i && i < h && 0 <= j && j < w;
}

int INF = 1<<30;
int a[2000][2000];
int point[2000][2000];

int ad(int i, int j){
    bool flag1 = false, flag2 = false;
    if(point[i][j] != INF) return point[i][j];
    int ans1, ans2;
    int c = (2*((i+j)%2 == 0)-1);
    if(is_in(i+1, j)){
        flag1 = true;
        ans1 = ad(i+1, j); 
        ans1 += c * a[i+1][j];
    }
    if(is_in(i, j+1)){
        flag2 = true;
        ans2 = ad(i, j+1);
        ans2 += c * a[i][j+1];
    }
    int ans = 0;
    if((i+j)%2 == 1 && (flag1 || flag2)){
        ans = 1<<30;
        if(flag1) ans = min(ans, ans1);
        if(flag2) ans = min(ans, ans2);
    }
    else if(flag1 || flag2){
        ans = -(1<<30);
        if(flag1) ans = max(ans, ans1);
        if(flag2) ans = max(ans, ans2);
    }
    point[i][j] = ans;

    return ans;
}

signed main(){
    // cout << fixed << setprecision(10) << flush;

    cin >> h >> w;
    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            char c;
            cin >> c;
            if(c == '+') a[i][j] = 1;
            else a[i][j] = -1;
        }
    }

    for(int i=0; i<h; i++){
        for(int j=0; j<w; j++){
            point[i][j] = INF;
        }
    }
    
    int ans = ad(0, 0);
    // cout << ans << endl;
    if(ans > 0) cout << "Takahashi" << endl;
    else if(ans < 0) cout << "Aoki" << endl;
    else cout << "Draw" << endl;

    return 0;
}