#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define INF_MIN 100000000 #define INF 1145141919 #define INF_MAX 2147483647 #define LL_MAX 9223372036854775807 #define EPS 1e-10 #define PI acos(-1) #define LL long long using namespace std; typedef pair P; #define MAX_N 13 int N[4]; //0:Taro 1:Jiro int memo[2][MAX_N][MAX_N][MAX_N][MAX_N]; int solve(int turn, int a, int b, int c, int d){ if(memo[turn][a][b][c][d]) return memo[turn][a][b][c][d]; int nextTurn = (turn + 1) % 2; if((a || b || c || d) == 0) return nextTurn; for(int sub = 1; sub <= 3; sub++){ if(a-sub >= 0){ if(solve(nextTurn, a-sub, b, c, d) == turn){ return memo[turn][a][b][c][d] = turn; } } if(b-sub >= 0){ if(solve(nextTurn, a, b-sub, c, d) == turn){ return memo[turn][a][b][c][d] = turn; } } if(c-sub >= 0){ if(solve(nextTurn, a, b, c-sub, d) == turn){ return memo[turn][a][b][c][d] = turn; } } if(d-sub >= 0){ if(solve(nextTurn, a, b, c, d-sub) == turn){ return memo[turn][a][b][c][d] = turn; } } } return memo[turn][a][b][c][d] = nextTurn; } int main(){ int ans = 0; for(int i = 0; i < 4; i++){ cin >> N[i]; } if(solve(0, N[0], N[1], N[2], N[3]) == 0) cout << "Taro" << endl; else cout << "Jiro" << endl; return 0; }