#include // cout, endl, cin #include // string, to_string, stoi #include // vector #include // min, max, swap, sort, reverse, lower_bound, upper_bound #include // pair, make_pair #include // tuple, make_tuple #include // int64_t, int*_t #include // printf #include // map #include // queue, priority_queue #include // set #include // stack #include // deque #include // unordered_map #include // unordered_set #include // bitset #include // isupper, islower, isdigit, toupper, tolower #include //fixed,setprecision //#include //INT_MAX //#include //M_PI #include #include // 正規表現 #include #include //#include using namespace std; #include using namespace atcoder; #define ll long long #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) //contain(string s,string v) sにvが含まれるかを判定 template bool contain(const std::basic_string& s, const U& v) { return s.find(v) != std::basic_string::npos; } struct Data { int h; int p; int x; }; bool compareByH(const Data& a, const Data& b) { return a.h < b.h; } int main() { int n = 0; int sx=12; while (n != -1) { cin >> n; if (n == -1) return 0; vector data(n); for (int i = 0; i < n; i++) { cin >> data[i].h >> data[i].p >> data[i].x; } sort(data.begin(), data.end(), compareByH); char choice[3] = {'L', 'R', 'S'}; int r=0; if(sx< data[0].x)r=0; else if(sx>data[0].x)r=1; else r=2; char c=choice[r]; cout << c << endl; } return 0; }