#include #include using namespace std; vector>>> dp(20, vector>>(20, vector>(20, vector(20, -1)))); bool f(vector &n){ if(dp[n[0]][n[1]][n[2]][n[3]] != -1) return dp[n[0]][n[1]][n[2]][n[3]]; vector cnt(30, 0); for(int i = 0; i < 4; i++){ int org = n[i]; for(int j = 1; j <= 3 && n[i] > 0; j++){ n[i]--; cnt[f(n)]++; } n[i] = org; } for(int i = 0; i < 30; i++){ if(cnt[i] == 0){ dp[n[0]][n[1]][n[2]][n[3]] = i; break; } } return dp[n[0]][n[1]][n[2]][n[3]]; } int main(){ vector n(4); for(auto &p: n) cin >> p; if(f(n) == 0) cout << "Jiro" << endl; else cout << "Taro" << endl; return 0; }