#include #include typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; using namespace std; using namespace atcoder; typedef pair pll; ll p = 998244353; ll INF = 2000000000000000010; template bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } void yn(bool a){ if(a){ cout << "Yes" <& a){ ll n = (ll)a.size(); vector b(n+1,0); for(ll i = 0;i= 0){ b[a[i]]++; } } for(ll i = 0;i two(64,1); void init() { std::cout << std::fixed << std::setprecision(10); for(ll i = 1;i<64;i++){ two.at(i) = two.at(i-1)*2; } } vector> vec_seki(const vector>& a,const vector>& b,ll p){ if(a.size() == 0){ return {}; } assert(a[0].size() == b.size()); assert(p != 0); vector> ans(a.size(),vector(b[0].size(),0)); for(ll i = 0;i<(ll)a.size();i++){ for(ll k = 0;k<(ll)a[0].size();k++){ for(ll j = 0;j<(ll)b[0].size();j++){ ans[i][j] = (ans[i][j]+a[i][k] * b[k][j])%p; } } } return ans; } template vector> runlength(const vector& vec){ vector> ret; if(vec.size()==0){ return ret; } pair temp; temp.first = vec[0]; temp.second = 1; ret.push_back(temp); T mae = vec[0]; for(ll i = 1;i<(ll)vec.size();i++){ if(vec[i] != mae){ temp.first = vec[i]; temp.second = 1; ret.push_back(temp); mae = vec[i]; } else{ ret[ret.size()-1].second++; } } return ret; } ll bintoll(const string& S){ ll ret = 0; ll n = (ll)S.size(); for(ll i = 0;i>= 1; } reverse(S.begin(),S.end()); return S; } void solve(){ ll A,B,D,R; cin >> A >> B >> D >> R; ll usa = D*A; ll kame = B*(D+R); if(usa > kame){ cout << "rabbit" << endl; } else if(usa < kame){ cout << "turtle" << endl; } else{ cout << "tie" << endl; } } int main() { init(); ll T; cin >> T; while(T--)solve(); // ここにプログラムを追記 }