



#include <iostream>
#include<iomanip>
#include<math.h>
using namespace std;
int main() {
int v1, v2, tt, s, l;
while (cin >> v1 >> v2 >> tt >> s >> l) {
int s1 = 0, s2 = 0;
int t = 0;
while (s1 < l && s2 < l) {
if (s1 - tt >= s2) {
//开始懒惰
int ff_s = s;
while (s2<l && ff_s--)//防止爬过了
{
s2 += v2;
t++;
}
}
else{
s1 += v1;
s2 += v2;
t++;
}
}
if (s1 == s2)cout << 'D' << endl;
else if (s1 > s2)cout << 'R' << endl;
else cout << 'T' << endl;
cout << t << endl;
}
return 0;
}