#include using namespace std; namespace { typedef double real; typedef long long ll; template ostream& operator<<(ostream& os, const vector& vs) { if (vs.empty()) return os << "[]"; auto i = vs.begin(); os << "[" << *i; for (++i; i != vs.end(); ++i) os << " " << *i; return os << "]"; } template istream& operator>>(istream& is, vector& vs) { for (auto it = vs.begin(); it != vs.end(); it++) is >> *it; return is; } vector N; int S; void input() { N.resize(4); cin >> N; S = 0; for (int i = 0; i < 4; i++) S += N[i]; } const int INF = 1<<28; map, map> cache; int dfs(vector& xs, int tscore, int t) { if (cache.count(xs) && cache[xs].count(tscore)) { return cache[xs][tscore]; } int sum = 0; for (int i = 0; i < 4; i++) sum += xs[i]; int jscore = S - sum - tscore; //int nscore = tscore; // 譛€濶ッ謇九r縺ィ縺」縺溘→縺阪・taro縺ョ轤ケ謨ー int nscore = (t ? -1 : INF); int flag = false; for (int i = 0; i < 4; i++) { if (xs[i] == 0) continue; flag = true; for (int j = 1; j <= min(3, xs[i]); j++) { xs[i] -= j; if (t) { nscore = max(nscore, dfs(xs, tscore + j + (xs[i] == 0 ? (jscore + 1) / 2 : 0), !t)); } else { nscore = min(nscore, dfs(xs, tscore - (xs[i] == 0 ? (tscore + 1) / 2 : 0), !t)); } xs[i] += j; } } return cache[xs][tscore] = (flag ? nscore : tscore); } void solve() { int t = dfs(N, 0, 1); int j = S - t; if (t == j) { cout << "Draw" << endl; } else if (t > j) { cout << "Taro" << endl; } else { assert(t < j); cout << "Jiro" << endl; } } } int main() { input(); solve(); return 0; }