#include <bits/stdc++.h>
#define F first
#define S second
#define rep(i, a, b) for(int i = (a); i < (b); ++i)
#define per(i, a, b) for(int i = (b)-1; i >= (a); --i)
#define bck(i, a, b) if ((i) >= (a) && (i) < (b))
#define trav(x, a) for (auto &x : (a))
#define sz(a) (int)(a).size()
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define pb push_back
#define eb emplace_back
using namespace std;
typedef long long ll;
typedef string str;
template<typename T> using vec = vector<T>;
template<typename T> using pq = priority_queue<T, vector<T>, std::greater<T>>;
template<typename T> using mxpq = priority_queue<T>;
typedef pair<int,int> pii;
typedef vec<int> vi;
typedef vec<pii> vii;
typedef vec<vi> vvi;
typedef pair<ll,ll> pll;
typedef vec<ll> vl;
typedef vec<pll> vll;
typedef vec<vl> vvl;
template<typename A, typename B>
istream& operator>>(istream& s, pair<A,B>& p) { return s>>p.first>>p.second; }
template<typename T>
istream& operator>>(istream& s, vec<T>& p) {
    for (T& t : p) s >> t;
    return s;
}

vec<pair<pii, pii>> squares;
vec<pair<pii, int>> points;
vec<bool> grid(10000*10000);

bool expand_up(int i) {
    int y = squares[i].S.S;
    if (y == 10000) return false;
    rep(x, squares[i].F.F, squares[i].S.F) {
        if (grid[y*10000 + x]) return false;
    }
    squares[i].S.S += 1;
    rep(x, squares[i].F.F, squares[i].S.F) {
        grid[y*10000 + x] = true;
    }
    return true;
}
bool expand_down(int i) {
    int y = squares[i].F.S;
    if (y == 0) return false;
    y -= 1;
    rep(x, squares[i].F.F, squares[i].S.F) {
        if (grid[y*10000 + x]) return false;
    }
    squares[i].F.S -= 1;
    rep(x, squares[i].F.F, squares[i].S.F) {
        grid[y*10000 + x] = true;
    }
    return true;
}
bool expand_left(int i) {
    int x = squares[i].F.F;
    if (x == 0) return false;
    x -= 1;
    rep(y, squares[i].F.S, squares[i].S.S) {
        if (grid[y*10000 + x]) return false;
    }
    squares[i].F.F -= 1;
    rep(y, squares[i].F.S, squares[i].S.S) {
        grid[y*10000 + x] = true;
    }
    return true;
}
bool expand_right(int i) {
    int x = squares[i].S.F;
    if (x == 10000) return false;
    rep(y, squares[i].F.S, squares[i].S.S) {
        if (grid[y*10000 + x]) return false;
    }
    squares[i].S.F += 1;
    rep(y, squares[i].F.S, squares[i].S.S) {
        grid[y*10000 + x] = true;
    }
    return true;
}

int area(int i) {
    auto &s = squares[i];
    return abs(s.F.F - s.S.F) * abs(s.F.S - s.S.S);
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
    int n; cin >> n;
    rep(i, 0, n) {
        int x, y, r; cin >> x >> y >> r;
        points.pb({{x, y}, r});
        squares.pb({{x, y}, {x+1, y+1}});
        grid[y*10000 + x] = true;
    }
    vec<bool> up(n, true), left(n, true), down(n, true), right(n, true);
    while (true) {
        bool done = true;
        rep(i, 0, n) {
            if (area(i) < points[i].S) {
                up[i] = up[i] && expand_up(i);
                left[i] = left[i] && expand_left(i);
                down[i] = down[i] && expand_down(i);
                right[i] = right[i] && expand_right(i);
            } else { up[i] = left[i] = down[i] = right[i] = false; }
            done = done && !up[i] && !left[i] && !left[i] && !right[i];
        }
        if (done) break;
    }
    trav(x, squares) {
        printf("%d %d %d %d\n", x.F.F, x.F.S, x.S.F, x.S.S);
    }
}

#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll ,ll> pll;
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define all(X) (X).begin(), (X).end()
#define REP(i,x,y) for(ll i = x;i <= y;++i)
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
vector<string> vec_splitter(string s) {
    for(char& c: s) c = c == ','?  ' ': c;
    stringstream ss; ss << s;
    vector<string> res;
    for(string z; ss >> z; res.push_back(z))
        ;
    return res;
}
void debug_out(vector<string> args, int idx) { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, Head H, Tail... T) {
    if(idx > 0) cerr << ", ";
    stringstream ss; ss << H;
    cerr << args[idx] << " = " << ss.str();
    debug_out(args, idx + 1, T...);
}
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __VA_ARGS__)
void localTest() {
    #ifndef ONLINE_JUDGE
        freopen("inp", "r", stdin);
        freopen("out", "w", stdout);
    #endif      
}
const int N = 2e3 + 5;
int A[N][N], dp[N][N][2], n, m;
bool check(int x, int y) {
    return (x >= 1 and x <= n and y >= 1 and y <= m);
}
int doit(int x, int y, int z) {
    if(x == n and y == m) {
        return 0;
    }
    int &ret = dp[x][y][z];
    if(ret != -1) {
        return ret;
    }
    int ans = 0, v1 = -1e9, v2 = -1e9, inf = -1e9;
    if(check(x + 1, y)) {
        v1 = A[x + 1][y] - doit(x + 1, y, z ^ 1);
    }
    if(check(x, y + 1)) {
        v2 = A[x][y + 1] - doit(x, y + 1, z ^ 1);
    }
    ans = max(v1, v2);
    // debug(x, y, v1, v2);
    if(ans == inf) {
        ans = 0;
    }
    return ret = ans;
}
void solver() {
    memset(dp, -1, sizeof dp);
    cin >> n >> m;
    string s[n];
    for(int i = 0; i < n; ++i) {
        cin >> s[i];
        for(int j = 0; j < m; ++j) {
            A[i + 1][j + 1] = 1;
            if(s[i][j] == '-') {
                A[i + 1][j + 1] = -1;
            }
        }
    }
    int ans = doit(1, 1, 0);
    if(n == 1 and m == 1) {
        ans = 0;
    }
    if(ans > 0) {
        cout << "Takahashi\n";
    } else if(ans < 0) {
        cout << "Aoki\n";
    } else {
        cout << "Draw\n";
    }
    return;
}
int main() {

    localTest();
    fastio;
    int t = 1;
    // cin >> t;
    while(t--) {
        solver();
    }

    return 0;
}