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

int main() {
  
  ll h,w;
  cin>>h>>w;
  vector<vector<ll>> a(h,vector<ll>(w));
  for(ll i=0;i<h;i++){
    for(ll j=0;j<w;j++){
      char u;
      cin>>u;
      if(u=='-') a.at(i).at(j)=-1;
      else a.at(i).at(j)=1;
    }
  }
  
  vector<vector<ll>> b(h,vector<ll>(w));
  b.at(h-1).at(w-1)=0;
  for(ll i=w-2;i>=0;i--){
    if((h+i-1)%2==0) b.at(h-1).at(i)=b.at(h-1).at(i+1)+a.at(h-1).at(i+1);
    else b.at(h-1).at(i)=b.at(h-1).at(i+1)-a.at(h-1).at(i+1);
  }
  for(ll i=h-2;i>=0;i--){
    if((w-1+i)%2==0) b.at(i).at(w-1)=b.at(i+1).at(w-1)+a.at(i+1).at(w-1);
    else b.at(i).at(w-1)=b.at(i+1).at(w-1)-a.at(i+1).at(w-1);
  }
  
  for(ll i=h-2;i>=0;i--){
    for(ll j=w-2;j>=0;j--){
      if((i+j)%2==0){
        b.at(i).at(j)=max(b.at(i+1).at(j)+a.at(i+1).at(j),b.at(i).at(j+1)+a.at(i).at(j+1));
      }
      else{
        b.at(i).at(j)=min(b.at(i+1).at(j)-a.at(i+1).at(j),b.at(i).at(j+1)-a.at(i).at(j+1));
      }
    }
  }
  
  /*for(ll i=0;i<h;i++){
    for(ll j=0;j<w;j++){
      cout<<b.at(i).at(j)<<" ";
    }
    cout<<endl;
  }*/
  
  ll ans=b.at(0).at(0);
  if(ans>0) cout<<"Takahashi";
  if(ans<0) cout<<"Aoki";
  if(ans==0) cout<<"Draw";
  
}

#include <bits/stdc++.h>
using namespace std;
int n,m,a[1005],b[1005],dp[1005][1005];

int main() {
	memset(dp,0x3f,sizeof(dp));
	dp[0][0]=0;
	cin>>n>>m;
	for (int i=0; i<n; ++i) cin>>a[i];
	for (int i=0; i<m; ++i) cin>>b[i];
	a[n]=-1,b[m]=-2;
	for (int i=0; i<=n; ++i)
		for (int j=0; j<=m; ++j) {
			dp[i+1][j]=min(dp[i+1][j],dp[i][j]+1);
			dp[i][j+1]=min(dp[i][j+1],dp[i][j]+1);
			dp[i+1][j+1]=min(dp[i+1][j+1],dp[i][j]+(a[i]!=b[j]));
		}
	cout<<dp[n][m];
}