#include using namespace std; long long int gcd(long long int a,long long int b) { if(b==0) return a; return gcd(b,a%b); } int main(void) { cin.tie(0); ios::sync_with_stdio(false); long long int r,a,b,d; int tc; cin >> tc; while(tc--) { cin >> a >> b >> d >> r; long long int g = gcd(d,r); d/=g; r/=g; long long int N = (d+r); if(r*a > b*N) { cout << "rabbit" << '\n'; } else if(r*a == b*N) { cout << "tie" << '\n'; } else { cout << "turtle" << '\n'; } } return 0; }