#include #include #include using namespace std; using ll = long long; int memo[14][14][14][14][60][60],vis[14][14][14][14][60][60]; int calc(int a,int b,int c,int d,int x,int y) { if(vis[a][b][c][d][x][y]++) return memo[a][b][c][d][x][y]; if(a+b+c+d==0) { if(x>y) return memo[a][b][c][d][x][y] = 1; if(x==y) return memo[a][b][c][d][x][y] = 0; return memo[a][b][c][d][x][y] = -1; } int p = 0; int q = 0; int r = 0; if(a){ for(int i = 1;i<=3;i++){ if(i>a) continue; int nx = x + i; int ny = y; if(a==i){ int get = (ny+1) / 2; ny -= get; nx += get; } swap(nx,ny); int ans = calc(a-i,b,c,d,nx,ny); if(ans==-1) p++; else if(ans==0) q++; else r++; } } if(b){ for(int i = 1;i<=3;i++){ if(i>b) continue; int nx = x + i; int ny = y; if(b==i){ int get = (ny+1) / 2; ny -= get; nx += get; } swap(nx,ny); int ans = calc(a,b-i,c,d,nx,ny); if(ans==-1) p++; else if(ans==0) q++; else r++; } } if(c){ for(int i = 1;i<=3;i++){ if(i>c) continue; int nx = x + i; int ny = y; if(c==i){ int get = (ny+1) / 2; ny -= get; nx += get; } swap(nx,ny); int ans = calc(a,b,c-i,d,nx,ny); if(ans==-1) p++; else if(ans==0) q++; else r++; } } if(d){ for(int i = 1;i<=3;i++){ if(i>d) continue; int nx = x + i; int ny = y; if(d==i){ int get = (ny+1) / 2; ny -= get; nx += get; } swap(nx,ny); int ans = calc(a,b,c,d-i,nx,ny); if(ans==-1) p++; else if(ans==0) q++; else r++; } } if(p) return memo[a][b][c][d][x][y] = 1; if(q) return memo[a][b][c][d][x][y] = 0; return memo[a][b][c][d][x][y] = -1; } int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int a,b,c,d; cin>>a>>b>>c>>d; int ans = calc(a,b,c,d,0,0); if(ans==1) cout<<"Taro\n"; else if(ans==0) cout<<"Draw\n"; else cout<<"Jiro\n"; }