#include "bits/stdc++.h"

using namespace std;
using ll = long long;

bool pTakahashi(int i, int j) {
    return (i + j) % 2 == 1;
}
void Main() {
    int H, W;
    cin >> H >> W;
    vector<vector<int>> A(H, vector<int>(W, 0));
    for (int i = 0; i < H; ++i) {
        string s;
        cin >> s;
        for (int j = 0; j < W; ++j) {
            A[i][j] = s[j] == '+' ? 1 : -1;
        }
    }

    if (H == 1 && W == 1) {
        cout << "Draw" << endl;
        return;
    }

    vector<vector<pair<int, int>>> p(H, vector<pair<int, int>>(W, make_pair(0, 0)));
    if (pTakahashi(H - 1, W - 1)) {
        p[H - 1][W - 1].first = A[H - 1][W - 1];
        p[H - 1][W - 1].second = 0;
    }
    else {
        p[H - 1][W - 1].first = 0;
        p[H - 1][W - 1].second = A[H - 1][W - 1];
    }
    for (int i = H - 1; i >= 0; --i) {
        for (int j = W - 1; j >= 0; --j) {
            if (i == H - 1 && j == W - 1) {
                continue;
            }
            pair<int, int>& T_A = p[i][j];
            if (pTakahashi(i, j)) {
                if (i > 0 || j > 0) {
                    T_A.first = A[i][j];
                }
                if (i == H - 1) {
                    T_A.second += p[i][j + 1].second;
                    T_A.first += p[i][j + 1].first;
                }
                else if (j == W - 1) {
                    T_A.second += p[i + 1][j].second;
                    T_A.first += p[i + 1][j].first;
                }
                else {
                    if (p[i + 1][j].second - p[i + 1][j].first > p[i][j + 1].second - p[i][j + 1].first) {
                        T_A.second += p[i + 1][j].second;
                        T_A.first += p[i + 1][j].first;
                    }
                    else {
                        T_A.second += p[i][j + 1].second;
                        T_A.first += p[i][j + 1].first;
                    }
                }
            }
            else {
                if (i > 0 || j > 0) {
                    T_A.second = A[i][j];
                }
                if (i == H - 1) {
                    T_A.first += p[i][j + 1].first;
                    T_A.second += p[i][j + 1].second;
                }
                else if (j == W - 1) {
                    T_A.first += p[i + 1][j].first;
                    T_A.second += p[i + 1][j].second;
                }
                else {
                    if (p[i + 1][j].first - p[i + 1][j].second > p[i][j + 1].first - p[i][j + 1].second) {
                        T_A.first += p[i + 1][j].first;
                        T_A.second += p[i + 1][j].second;
                    }
                    else {
                        T_A.first += p[i][j + 1].first;
                        T_A.second += p[i][j + 1].second;
                    }
                }
            }
        }
    }
    if (p[0][0].first > p[0][0].second) {
        cout << "Takahashi" << endl;
    }
    else if (p[0][0].first < p[0][0].second) {
        cout << "Aoki" << endl;
    }
    else {
        cout << "Draw" << endl;
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;
constexpr ll INF = (1LL << 60);
int main(){
  int n, m;
  cin >> n >> m;
  vector<int> h(n), w(m);
  rep(i,n) cin >> h[i];
  rep(i,m) cin >> w[i];

  sort(h.begin(), h.end());
  sort(w.begin(), w.end());

  vector<int> v(n); //各生徒に対する先生の最適解
  for (int i = 0; i < n; i++) {
    int itr = lower_bound(w.begin(), w.end(), h[i]) - w.begin();
    if (itr == m) itr--;
    v[i] = abs(w[itr] - h[i]);
    itr--;
    if (itr >= 0) v[i] = min(v[i], abs(w[itr] - h[i]));
  }

  vector<ll> cum1(n / 2 + 2, 0), cum2(n / 2 + 2, 0);
  for (int i = 0; i < n; i += 2) {
    int j = i / 2;
    cum1[j + 1] = cum1[j] + abs(h[i] - h[i + 1]);
  }
  for (int i = n - 2; i >= 0; i -= 2) {
    int j = (i + 1) / 2;
    cum2[j] = cum2[j + 1] + abs(h[i] - h[i + 1]);
  }

  ll res = INF;

  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      int l = i / 2, r = (i + 2) / 2;
      res = min(res, cum1[l] + cum2[r] + v[i]);
    } else {
      int l = i / 2, r = (i + 3) / 2;
      res = min(res, cum1[l] + cum2[r] + v[i] + abs(h[i - 1] - h[i + 1]));
    }
  }

  cout << res << endl;
  return 0;
}