#include <cstdio>
#include <algorithm>

using namespace std;

const int MOD = 1e9 + 7;
char a[2005][2005];
int hc[2005][2005];
int wc[2005][2005];
int two[4000005];
int main()
{
	int h, w;
	scanf("%d%d", &h, &w);
	for (int i = 0; i < h; i++) {
		scanf("%s", a[i]);
	}
	int tidy = 0;
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '.') {
				tidy++;
				if (i - 1 >= 0) {
					hc[i][j] = hc[i - 1][j] + 1;
				} else {
					hc[i][j] = 1;
				}
				if (j - 1 >= 0) {
					wc[i][j] = wc[i][j - 1] + 1;
				} else {
					wc[i][j] = 1;
				}
			}
		}
	}
	for (int i = h - 1; i >= 0; i--) {
		for (int j = w - 1; j >= 0; j--) {
			if (a[i][j] == '#') continue;
			if (i + 1 <= h - 1) hc[i][j] = max(hc[i][j], hc[i + 1][j]);
			if (j + 1 <= w - 1) wc[i][j] = max(wc[i][j], wc[i][j + 1]);
		}
	}
	two[0] = 1;
	for (int i = 1; i < 4000005; i++) {
		two[i] = two[i - 1] * 2 % MOD;
	}
	long long ans = two[tidy];
	ans = ans * tidy % MOD;
	for (int i = 0; i < h; i++) {
		for (int j = 0; j < w; j++) {
			if (a[i][j] == '#') continue;
			long long tmp = tidy - (hc[i][j] + wc[i][j] - 1);
			ans -= two[tmp];
			if (ans < 0) ans += MOD;
		}
	}
	printf("%lld\n", ans);
	return 0;
}

#include <cstdio>
#include <cmath>
#include <iostream>
#include <set>
#include <algorithm>
#include <vector>
#include <map>
#include <cassert>
#include <string>
#include <cstring>
#include <queue>

using namespace std;

#define rep(i,a,b) for(int i = a; i < b; i++)
#define S(x) scanf("%d",&x)
#define S2(x,y) scanf("%d%d",&x,&y)
#define P(x) printf("%d\n",x)
#define all(v) v.begin(),v.end()
#define FF first
#define SS second
#define pb push_back
#define mp make_pair

typedef long long int LL;
typedef pair<int, int > pii;
typedef vector<int > vi;

const int N = 2001;
const int INF = 100000000;

int n,m;
string s[N];
int dp[N][N][2];

int getval(int x, int y) {
  if(s[x][y] == '+') return 1;
  return -1;
}

int solve(int x, int y, int p) {
  if(x == n - 1 && y == m - 1) {
    return 0;
  }
  int &res = dp[x][y][p];
  if(res != INF) {
    return res;
  }
  if(p == 0) {
    res = -N * N;
  } else {
    res = N * N;
  }

  if(x + 1 < n) {
    if(p == 0) {
      res = max(res, getval(x + 1, y) + solve(x + 1, y, p ^ 1));
    } else {
      res = min(res, -getval(x + 1, y) + solve(x + 1, y, p ^ 1));
    }
  }

  if(y + 1 < m) {
    if(p == 0) {
      res = max(res, getval(x, y + 1) + solve(x, y + 1, p ^ 1));
    } else {
      res = min(res, -getval(x, y + 1) + solve(x, y + 1, p ^ 1));
    }
  }

  return res;
}

int main() {
  S2(n,m);
  rep(i,0,n) {
    cin >> s[i];
  }
  rep(i,0,N) rep(j,0,N) {
    dp[i][j][0] = dp[i][j][1] = INF;
  }
  int x = solve(0, 0, 0);
  if(x > 0) printf("Takahashi\n");
  else if(x < 0) printf("Aoki\n");
  else printf("Draw\n");
  return 0;
}
