#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; vector memo; int solve(const vector& x) { if(accumulate(x.begin(), x.begin() + 4, 0) == 0) return x[4] - x[5]; int hash = x[4]; for(int i=0; i<4; ++i){ hash *= 14; hash += x[i]; } if(memo[hash] != -1) return memo[hash]; int ret = INT_MIN; for(int i=0; i<4; ++i){ for(int j=1; j<=min(3, x[i]); ++j){ vector y = x; y[i] -= j; y[4] += j; if(y[i] == 0){ int a = (y[5] + 1) / 2; y[4] += a; y[5] -= a; } swap(y[4], y[5]); ret = max(ret, -solve(y)); } } return memo[hash] = ret; } int main() { vector x(6, 0); for(int i=0; i<4; ++i) cin >> x[i]; memo.assign(14*14*14*14*53, -1); int ret = solve(x); if(ret > 0) cout << "Taro" << endl; else if(ret == 0) cout << "Draw" << endl; else cout << "Jiro" << endl; return 0; }