#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #define mod 1000000007 #define INF 1000000000 #define LLINF 2000000000000000000LL #define PI 3.1415926536 #define SIZE 1000 int memo[2][15][15][15][15][53]; int dfs(int turn,int a,int b,int c,int d,int ta,int ji){ int ret[4][4],RET; int T=ta; if(memo[turn][a+1][b+1][c+1][d+1][T]>0) return memo[turn][a+1][b+1][c+1][d+1][T]-1; if(a==0 || b==0 || c==0 || d==0){ if(turn==1){ //taro ta+=(ji+1)/2; ji-=(ji+1)/2; }else{ //jiro ji+=(ta+1)/2; ta-=(ta+1)/2; } if(a==0) a=-1; if(b==0) b=-1; if(c==0) c=-1; if(d==0) d=-1; } if(a==-1 && b==-1 && c==-1 && d==-1){ if(ta>ji){ return 2; }else if(ta==ji){ return 1; }else{ return 0; } } for(int i=0;i<4;i++) for(int j=1;j<=3;j++) ret[j][i] = 0+turn*2; //T:0 J:2 for(int i=1;i<=3;i++){ if(!turn) ta++; else ji++; if(a>=i) ret[i][0] = dfs(!turn,a-i,b,c,d,ta,ji); if(b>=i) ret[i][1] = dfs(!turn,a,b-i,c,d,ta,ji); if(c>=i) ret[i][2] = dfs(!turn,a,b,c-i,d,ta,ji); if(d>=i) ret[i][3] = dfs(!turn,a,b,c,d-i,ta,ji); } ta-=3; ji-=3; RET = ret[1][0]; for(int j=1;j<=3;j++){ for(int i=1;i<4;i++){ if(turn==0){ //taro RET = max(ret[j][i],RET); }else{ //jiro RET = min(ret[j][i],RET); } } } memo[turn][a+1][b+1][c+1][d+1][T] = RET+1; return RET; } int main(){ int a,b,c,d,sum,ans; scanf("%d%d%d%d",&a,&b,&c,&d); sum = a+b+c+d; ans = dfs(0,a,b,c,d,0,0); if(ans==2){ puts("Taro"); }else if(ans==0){ puts("Jiro"); }else{ puts("Draw"); } return 0; }