#include <bits/stdc++.h>
using namespace std;

int win[7][200010], memo[80];
bool judge(bool tak, bool w1, bool w2){return tak ? w1 || w2 : w1 && w2;}

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int n; string s, x;
    cin >> n >> s >> x;
    for (int j = 0; j < 7; ++j) for (int i = 0; i < n + 1; ++i) win[j][i] = -1;
    for (int i = 0; i < 70; ++i) memo[i] = i % 7;

    auto dfs = [&](auto dfs, int res, int round)->bool{
        int num = s[round] - '0', tak = x[round] == 'T', n1 = memo[res * 10 + num], n2 = memo[res * 10];
        if (round == n - 1) return win[res][round] = judge(tak, memo[n1] == 0, memo[n2] == 0);
        else if (win[res][round] != -1) return win[res][round];

        bool w1 = dfs(dfs, n1, round + 1), w2 = dfs(dfs, n2, round + 1);
        return win[res][round] = judge(tak, w1, w2);
    };

    cout << (dfs(dfs, 0, 0) ? "Takahashi\n" : "Aoki\n");
    return 0;
}
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)

using std::cin;
using std::cout;
using std::vector;
using std::string;
using std::max;

const int INF = 1001001001;

int h, w;
int a[2005][2005];

bool visited[2005][2005];
int memo[2005][2005];
int f(int i, int j) {
	if (i == h - 1 and j == w - 1) return 0;
	if (visited[i][j]) return memo[i][j];
	visited[i][j] = true;
	int res = -INF;
	if (j + 1 < w) res = max(res, a[i][j + 1] - f(i, j + 1));
	if (i + 1 < h) res = max(res, a[i + 1][j] - f(i + 1, j));
	return memo[i][j] = res; 
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	
	cin >> h >> w;
	vector<string> s(h);
	rep(i, h) cin >> s[i];
	
	rep(i, h)rep(j, w) a[i][j] = s[i][j] == '+' ? 1 : -1;
	
	int score = f(0, 0);
	if (score == 0) puts("Draw");
	if (score < 0) puts("Aoki");
	if (score > 0) puts("Takahashi");
	
	return 0;
}