#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <tuple>
#include <cstdio>
#include <cmath>
#define rep(i, n) for(i = 0; i < n; i++)
#define int long long
using namespace std;

int h, w;
string s[2000];
int a[2000][2000];
bool used[2000][2000];
int dp[2000][2000];
int INF = 1e+6;

//高橋君 - 青木君
int dfs(int y, int x) {
	if (y == h - 1 && x == w - 1) return 0;
	if (used[y][x]) return dp[y][x];
	
	int res;
	int mul = (y + x) % 2 ? -1 : 1;
	int ret = (mul == 1) ? -INF : INF;
	
	if (x < w - 1) {
		res = mul * a[y][x + 1] + dfs(y, x + 1);
		if (mul == 1) ret = max(res, ret);
		else ret = min(res, ret);
	}
	if (y < h - 1) {
		res = mul * a[y + 1][x] + dfs(y + 1, x);
		if (mul == 1) ret = max(res, ret);
		else ret = min(res, ret);
	}
	used[y][x] = true;
	return dp[y][x] = ret;
}

signed main() {
	int i, j;
	
	cin >> h >> w;
	rep(i, h) cin >> s[i];
	
	rep(i, h) rep(j, w) dp[i][j] = -1;
	rep(i, h) {
		rep(j, w) {
			if (s[i][j] == '-') a[i][j] = -1;
			else a[i][j] = 1;
		}
	}
	
	int res = dfs(0, 0);
	//cout << "res = " << res << endl;
	
	if (res > 0) cout << "Takahashi" << endl;
	else if (res == 0) cout << "Draw" << endl;
	else cout << "Aoki" << endl;
	return 0;
}
#include<bits/stdc++.h>
using namespace std;
#define ll  long long
#define ull unsigned long long
#define lld long double
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define f first
#define s second
#define mk make_pair

/*----------------------DEBUGGER---------------------------*/
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x <<" "; _print(x); cerr << endl;
#else
#define debug(x)
#endif


void _print(ll t) {cerr << t;}
void _print(int t) {cerr << t;}
void _print(string t) {cerr << t;}
void _print(char t) {cerr << t;}
void _print(lld t) {cerr << t;}
void _print(double t) {cerr << t;}
void _print(ull t) {cerr << t;}

template <class T, class V> void _print(pair <T, V> p);
template <class T> void _print(vector <T> v);
template <class T> void _print(set <T> v);
template <class T, class V> void _print(map <T, V> v);
template <class T> void _print(multiset <T> v);
template <class T, class V> void _print(pair <T, V> p) {cerr << "{"; _print(p.f); cerr << ","; _print(p.s); cerr << "}";}
template <class T> void _print(vector <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T> void _print(set <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T> void _print(multiset <T> v) {cerr << "[ "; for (T i : v) {_print(i); cerr << " ";} cerr << "]";}
template <class T, class V> void _print(map <T, V> v) {cerr << "[ "; for (auto i : v) {_print(i); cerr << " ";} cerr << "]";}
/*----------------------DEBUGGER---------------------------*/

int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  freopen("error.txt", "w", stderr);
#endif
  int tt = 1;
  //cin >> tt;
  while (tt--)
  {
    int n;
    cin >> n;
    ll a[n];
    for (int i = 0; i < n; i++)
      cin >> a[i];
    if (n == 1) {
      cout << a[0];
      return 0;
    }
    ll dp[n][2];
    ll num[n][2];
    memset(dp, 0, sizeof(dp));
    memset(num, 0, sizeof(num));
    ll mod = 1e9 + 7;
    dp[1][0] = (a[0] + a[1]) % mod;
    dp[1][1] = (a[0] - a[1] + mod) % mod;
    num[1][0] = 1;
    num[1][1] = 1;
    for (int i = 2; i < n; i++)
    {
      dp[i][0] = (dp[i - 1][0] + (num[i - 1][0] * a[i]) % mod + dp[i - 1][1] + (num[i - 1][1] * a[i]) % mod) % mod;
      dp[i][1] = (dp[i - 1][0] - (num[i - 1][0] * a[i]) % mod + mod) % mod;
      num[i][0] = (num[i - 1][0] + num[i - 1][1]) % mod;
      num[i][1] = num[i - 1][0];
    }
    for (int i = 1; i < n; i++)
    {
      debug(dp[i][0]);
      debug(dp[i][1]);
    }
    cout << (dp[n - 1][0] + dp[n - 1][1]) % mod;
  }//while
}//main