package no102; import java.util.Scanner; public class Main { static int[] n = new int[4]; static int sum = 0; static int[][][][][] dp; //unknown-0 taro-1 jiro-2 draw-3 public static void main(String[] args) { Scanner sc = new Scanner(System.in); for(int i=0;i<4;i++) { n[i] = sc.nextInt(); sum += n[i]; } dp = new int[14][14][14][14][sum+1]; int ans = dfs(n[0],n[1],n[2],n[3],0); if (ans == 1) { System.out.println("Taro"); }else if(ans == 2) { System.out.println("Jiro"); }else{ System.out.println("Draw"); } } static int dfs(int n1,int n2,int n3,int n4,int hand) { if (dp[n1][n2][n3][n4][hand] != 0) { return dp[n1][n2][n3][n4][hand]; } int ret = 0; if (n1 + n2 + n3 + n4 == 0) { if (hand * 2 == sum) { ret = 3; }else if (hand * 2 > sum) { ret = 1; }else{ ret = 2; } }else{ boolean win = false; boolean draw = false; for(int i=1;i<=3;i++) { if (i > n1) { break; } int x; if (i == n1) { x = dfs(n1-i,n2,n3,n4,(sum-n1-n2-n3-n4-hand)/2); }else{ x = dfs(n1-i,n2,n3,n4,sum-n1-n2-n3-n4-hand); } if (x == 2) { win = true; }else if(x == 3) { draw = true; } } for(int i=1;i<=3;i++) { if (i > n2) { break; } int x; if (i == n2) { x = dfs(n1,n2-i,n3,n4,(sum-n1-n2-n3-n4-hand)/2); }else{ x = dfs(n1,n2-i,n3,n4,sum-n1-n2-n3-n4-hand); } if (x == 2) { win = true; }else if(x == 3) { draw = true; } } for(int i=1;i<=3;i++) { if (i > n3) { break; } int x; if (i == n3) { x = dfs(n1,n2,n3-i,n4,(sum-n1-n2-n3-n4-hand)/2); }else{ x = dfs(n1,n2,n3-i,n4,sum-n1-n2-n3-n4-hand); } if (x == 2) { win = true; }else if(x == 3) { draw = true; } } for(int i=1;i<=3;i++) { if (i > n4) { break; } int x; if (i == n4) { x = dfs(n1,n2,n3,n4-i,(sum-n1-n2-n3-n4-hand)/2); }else{ x = dfs(n1,n2,n3,n4-i,sum-n1-n2-n3-n4-hand); } if (x == 2) { win = true; }else if(x == 3) { draw = true; } } if (win) { ret = 1; }else if(draw) { ret = 3; }else{ ret = 2; } } return dp[n1][n2][n3][n4][hand] = ret; } }