#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define pii pair<int, int>
#define FF first.first
#define FS first.second
#define pb push_back
using namespace std;
const ll N=1000006, INF=1e18, P=998244353;

ll q=1, n, m, y, z, l, r, k, a[N], b[N], f[N], ans, o, u, g, Ans[N];
string s[N],x;

int solve (int n, int r) {
    vector<int> p;
    for (int i=2; i*i<=n; ++i)
        if (n % i == 0) {
            p.push_back (i);
            while (n % i == 0)
                n/=i;
        }
    if (n>1)p.push_back (n);

    int sum = 0;
    for (int msk=1; msk<(1<<p.size()); ++msk) {
        int mult = 1,
            bits = 0;
        for (int i=0; i<(int)p.size(); ++i)
            if (msk & (1<<i)) {
                ++bits;
                mult *= p[i];
            }

        int cur = r / mult;
        if (bits % 2 == 1)
            sum += cur;
        else
            sum -= cur;
    }

    return r - sum;
}

main(){ios_base::sync_with_stdio(false), cin.tie(0);

	cin>>l>>r;
	if(l==1)l++;
	ans=(r-l+1)*(r-l);
	for(int i=l; i<=r; i++)ans-=solve(i, r)-solve(i, l-1);
	ans>>=1;
	for (int i=l; i<=r; i++)ans-=r/i-1;

	cout<<ans*2<<endl;

}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <climits>
#include <utility>
typedef long long ll;
using namespace std;

int main(void){
  int h, w, i, j;
  string buff;
  vector<vector<int> > field, score;

  cin >> h >> w;
  field.resize(h,vector<int>(w));
  score.resize(h,vector<int>(w));
  for(i=0;i<h;i++){
    cin >> buff;
    for(j=0;j<w;j++){
      if(buff[j]=='+') field[i][j] = 1;
      else field[i][j] = -1;
    }
  }

  if((h+w)%2==0){
    score[h-1][w-1] = field[h-1][w-1];
  }
  else{
    score[h-1][w-1] = field[h-1][w-1] * -1;
  }
  
  j = w-1;
  for(i=h-2;i>=0;i--){
    if((i+j)%2==0){
      score[i][j] = score[i+1][j] + field[i][j];
    }
    else{
      score[i][j] = score[i+1][j] - field[i][j];
    }
  }
  i = h-1;
  for(j=w-2;j>=0;j--){
    if((i+j)%2==0){
      score[i][j] = score[i][j+1] + field[i][j];
    }
    else{
      score[i][j] = score[i][j+1] - field[i][j];
    }
  }

  for(i=h-2;i>=0;i--){
    for(j=w-2;j>=0;j--){
      if((i+j)%2==0){
        score[i][j] = min(score[i+1][j],score[i][j+1]) + field[i][j];
      }
      else{
        score[i][j] = max(score[i+1][j],score[i][j+1]) - field[i][j];
      }
    }
  }

  if(h==1){
    if(w==1){
      cout << "Draw" << endl;
      return 0;
    }
    score[0][0] = score[0][1];
  }
  else if(w==1){
    score[0][0] = score[1][0];
  }
  else{
    score[0][0] = min(score[1][0],score[0][1]);
  }

  if(score[0][0]>0){
    cout << "Aoki" << endl;
  }
  else if(score[0][0]<0){
    cout << "Takahashi" << endl;
  }
  else{
    cout << "Draw" << endl;
  }

  return 0;
}
