#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

typedef long long ll;
typedef long double ld;
#define REP(i,a,b) for (int i = a; i <= b; i++)
#define REPR(i,a,b) for(int i = b; i >= a; i--)
#define all(a)              a.begin(), a.end()
#define alln(a, n)          (a, a+n)
#define sz(x) (int)(x).size()
#define MAX                 10000007
#define MIN                 -10000007
#define pi pair<int,int>
#define pl pair<ll,ll>
#define mii             map<int,int>
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define inf 1e18
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

typedef vector<int> vi; 
typedef vector<ll> vl; 
typedef vector<pi> vpi;
typedef vector<pl> vpl; 
typedef vector<vi> vvi; 
typedef vector<string> vs;
typedef set<int> si;
const int MOD=1e9+7;
ll lcm(ll a,ll b){return (a * b) / __gcd(a,b);}
ll gcd(ll a,ll b){return __gcd(a,b);}
ll power(ll a,ll b,ll MOD){if(b == 0)return 1;if(b == 1)return a;ll ans = power(a,b/2,MOD) % MOD;ans *= ans;ans %= MOD;if(b % 2 == 1)ans *= a;return ans%MOD;}
ll inverse(ll x){x%=MOD;return power(x,MOD-2,MOD);}
ll fact[1],inv[1];
void factorial(ll n){
  fact[0]=1;
  for(ll i=1;i<=n;i++){
    fact[i]=fact[i-1]*i;
    if(fact[i]>=MOD)
      fact[i]%=MOD;
  }
}
ll ncr(ll n,ll r){
  if(n<r||n<0||r<0)
    return 0;
  ll b=inv[n-r];
  ll c=inv[r];
  ll a=fact[n]*b;
  if(a>=MOD)
    a%=MOD;
  a*=c;
  if(a>=MOD)
    a%=MOD;
  return a;
}
vector<char> is_prime(100001, true);
void sieve(ll n){
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
        if (is_prime[i] && (long long)i * i <= n) {
            for (int j = i * i; j <= n; j += i)
                  is_prime[j] = false;
        }
  }    
}     
 
int main()
{
  ios::sync_with_stdio(0);
    cin.tie(0);
  #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
      
    int t;
    t=1;
    cout<<fixed<<setprecision(0);
     //  cin>>t;
    while(t--){
            ll n;
            cin>>n;
            ll a[n];
            set<ll>s;
            REP(i,0,n-1) cin>>a[i];
            ll j=0;
            REP(i,0,n-1){
              s.insert(a[i]);
              while(s.count(j)) j++;
              cout<<j<<"\n";
            }

       


             }
             cerr<<"Time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<endl;
    return 0;
}

// https://atcoder.jp/contests/abc201/tasks/abc201_d

// if we reach i,j with different path then still the subproblem remain same.
#include<bits/stdc++.h>
#define M_PI       3.14159265358979323846
#define Speed_UP  ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define     pb    push_back 
#define     ff    first 
#define     ss    second 
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#warning Remember to change t
inline void setIO();
using namespace std;
typedef long long ll;
typedef long double ld;
ll const MX = 2e3+7;
ll const inf = MX*MX + 7;
ll dp[MX][MX];
char grid[MX][MX];
ll h,w;

// ll f(ll i,ll j){
//     // if(i>w||j>h){
//     //     return -inf;
//     // }
//     return ;
// }

ll cost(ll i ,ll j){
    if(i==h&&j==w){
        return 0;
    }
    if(dp[i][j]!=inf){
        return dp[i][j];
    }
    ll a,b;
    if(((i+j)%2)==0){
        a = -inf;
        b = -inf;
        if(i<=h-1){
            a = cost(i+1,j)+(grid[i+1][j]=='+'?1:0);
        }
        if(j<=w-1){
            b = cost(i,j+1)+(grid[i][j+1]=='+'?1:0);
        }
         dp[i][j] = max(a,b);
         return dp[i][j];
    }else{
        a = inf;
        if(i<=h-1){
            a = cost(i+1,j)-(grid[i+1][j]=='+'?1:0);
        }
        if(j<=w-1){
            b = cost(i,j+1)-(grid[i][j+1]=='+'?1:0);
        }
        dp[i][j] = min(a,b);
        return dp[i][j];
    }
}


int solve(){
  cin >> h >> w;

  // cout << h << w << "\n";


  for(int i=1;i<=h;i++){
    for(int j=1;j<=w;j++){
        cin >> grid[i][j];
        dp[i][j]=inf;
    }
  }

  ll ans = cost(1,1);

  // for(int i=1;i<=h;i++){
  //   for(int j=1;j<=w;j++){
  //       cout << dp[i][j]<<" ";
  //   }
  //   cout<<"\n";
  // }

  if(ans>0){
    cout<<"Takahashi";
  }else if (ans==0){
    cout<<"Draw";
  }else{
    cout << "Aoki";
  }
  
    return 0;
  }
  
int main(){
    Speed_UP
    
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    #endif

    ll t = 1;
    while(t--){
        solve();
    }
}


inline void setIO(string name="") {
    #ifndef ONLINE_JUDGE 
    freopen((name+".in").c_str(), "r", stdin); 
    freopen((name+".out").c_str(), "w", stdout);
    #endif
    }
