#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define rep(i,n) for(int i=0;i=0;i--) #define DREP(i,n) for(int i=n;i>0;i--) #define Rep(i,m,n) for(int i=m;i vi; typedef vector > vvi; typedef pair pdd; typedef pair pii; const double pi=acos(-1.0); double rad(double t){return t*pi/180.0;} bool flag[15][15][15][15]; bool memo[15][15][15][15]; bool solve(int n1,int n2,int n3,int n4){ n1 = max(0,n1); n2 = max(0,n2); n3 = max(0,n3); n4 = max(0,n4); printf("solve(%d,%d,%d,%d) called\n",n1,n2,n3,n4); if(flag[n1][n2][n3][n4])return memo[n1][n2][n3][n4]; if(n1+n2+n3+n4<=3&&sg(n1)+sg(n2)+sg(n3)+sg(n4)==1)return true; if(n1>0)REP(c1,3){ if(!solve(n1-c1,n2,n3,n4)){ return memo[n1][n2][n3][n4]=flag[n1][n2][n3][n4]=true; } } if(n2>0)REP(c2,3){ if(!solve(n1,n2-c2,n3,n4)){ return memo[n1][n2][n3][n4]=flag[n1][n2][n3][n4]=true; } } if(n3>0)REP(c3,3){ if(!solve(n1,n2,n3-c3,n4)){ return memo[n1][n2][n3][n4]=flag[n1][n2][n3][n4]=true; } } if(n4>0)REP(c4,3){ if(!solve(n1,n2,n3,n4-c4)){ return memo[n1][n2][n3][n4]=flag[n1][n2][n3][n4]=true; } } flag[n1][n2][n3][n4]=true; return memo[n1][n2][n3][n4]=false; } int main(){ int n1,n2,n3,n4; scani(n1);scani(n2);scani(n3);scani(n4); if(solve(n1,n2,n3,n4))printf("Taro\n"); else printf("Jiro\n"); return 0; }