#include<bits/stdc++.h>
using namespace std;
int l,v1,v2,t,s,t1,t2,l1,l2;
int main(){
    cin>>v1>>v2>>t>>s>>l;
    while(l1<l&&l2<l){
		if(l2-l1>=t){
			t2+=s;
			t1+=s;
			l1+=s*v2;
		}
		else{
			t2++;
			t1++;
			l1+=v2;
			l2+=v1;
		}
	}
	if(l1>l2) cout<<"T"<<endl<<t1;
	if(l2>l1) cout<<"R"<<endl<<t2;
	if(l1==l2) cout<<"D"<<endl<<t1;
	return 0;       
}
/**************************************************************
	Problem: 1839
	User: zhangziang
	Language: C++
	Result: Wrong Answer
****************************************************************/