// time-limit: 2000
// problem-url: https://atcoder.jp/contests/abc201/tasks/abc201_d
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <array>
#include <random>
#include <cmath>
#include <chrono>
#include <list>
#include <ctime>
#include <sstream>
#include <queue>
#include <climits>
#include <stack>
#include <random>
#include <bitset>
#include <numeric>
#include <cassert>
using namespace std;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;
#define rep(x, b, e) for(int x=(b); x<(e); ++x)
#define trav(a, x) for(auto& a : x)
#define ford(x, b, e) for(int x=((int)(b))-1; x>=(e); --x)
#define all(c) c.begin(),c.end()
#define sz(x) ((int)((x).size()))
#define pb push_back
#define st first
#define nd second
#define mp(x,y) make_pair(x,y)
typedef short int sint;

#define what_is(x) cerr << #x << " is " << x << endl;


mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); // use rng() to get unsigned int
// mt19937_64 for random long longs

vector<string> a;
vector<vector<int>> dp;
const int inf = 1e9;

int h, w;

int solve(int row, int col) {
	if (row == h -1 && col == w - 1) {
		return 0;
	}
	if (dp[row][col] != -inf) return dp[row][col];
	auto cell = [&](int r, int c) {
		return a[r][c] == '+' ? 1 : -1;
	};
	if (row + 1 < h) {
		dp[row][col] = cell(row+1, col) - solve(row + 1, col);
	}
	if (col + 1 < w) {
		dp[row][col] = max(dp[row][col], cell(row, col + 1) - solve(row, col + 1));
	}
	return dp[row][col];
}

void solve() {
	cin >> h >> w;
	a.resize(h);
	rep(i, 0, h) {
		cin >> a[i];
	}
	dp.resize(h, vi(w, -inf));
	int score = solve(0, 0);
	// cout << score << endl;
	if (score > 0) {
		cout << "Takahashi\n";
	} else if (score == 0) {
		cout << "Draw\n";
	} else {
		cout << "Aoki\n";
	}
}

int main() {
	ios_base::sync_with_stdio(false); cin.tie(0);
	int t;
	// cin >> t;
	t = 1;
	while (t--) {
		solve();
	}
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, b) for(ll i = (a); i < (b); i++)
#define REP(i, a) FOR(i, 0, a)

const ll MAX_N = 2e5;
ll N;
bool dp[MAX_N + 1][7];

string S, X;

int main(){
	cin >> N >> S >> X;
	dp[N][0] = true;
	for(ll i = N - 1; i >= 0; i--){
		REP(j, 7){
			if(X[i] == 'A'){
				dp[i][j] = !(!dp[i + 1][j * 10 % 7] || !dp[i + 1][(j * 10 + S[i] - '0') % 7]);
			}else{
				dp[i][j] = dp[i + 1][j * 10 % 7] || dp[i + 1][(j * 10 + S[i] - '0') % 7];
			}
		}
	}
	cout << (dp[0][0] ? "Takahashi" : "Aoki") << endl;

}
