#include <bits/stdc++.h>
#define PB push_back
#define MP(x,y) make_pair(x,y)
#define F first
#define S second
#define LOOP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define lp(i,n) LOOP(i,0,n)
using namespace std;
typedef long long int lli;
typedef pair<int,int> pii;
char grid[2005][2005];
int dp[2005][2005];

int s(char c) {
    return c=='+' ? 1 : -1;
}
int main(){
    // freopen("in.txt", "r", stdin);
    // freopen("out.txt", "w", stdout);
    int h, w;
    scanf("%d%d", &h, &w);
    LOOP(i, 1, h+1) scanf(" %s", grid[i]+1);
    for(int i = h-1; i > 0; --i) dp[i][w] = -dp[i+1][w] + s(grid[i+1][w]);
    for(int j = w-1; j > 0; --j) dp[h][j] = -dp[h][j+1] + s(grid[h][j+1]);
    for(int i = h-1; i > 0; --i)
        for(int j = w-1; j > 0; --j)
            dp[i][j] = max(-dp[i+1][j] + s(grid[i+1][j]), -dp[i][j+1] + s(grid[i][j+1]));
    if (dp[1][1] > 0) printf("Takahashi");
    else if (dp[1][1] < 0) printf("Aoki");
    else printf("Draw");
    return 0;
}

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

using ll = long long;
vector<ll> prime = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71};

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  ll a, b;
  cin >> a >> b;
  
  vector<ll> dp((1 << 20), 0);
  dp[0] = 1;
  for (ll i = a; i <= b; i++) {
    ll bit_i = 0;
    for (int j = 0; j < prime.size() /* = 20 */ ; j++) {
      if (i % prime[j] == 0) bit_i |= (1 << j);
    }
    for (int bit = 0; bit < (1 << 20); bit++) {
      if ((bit & bit_i) > 0) continue;
      dp[bit | bit_i] += dp[bit];
    }
  }
  
  ll ans = 0;
  for (int bit = 0; bit < (1 << 20); bit++) ans += dp[bit];
  
  cout << ans << '\n';
}