#include using namespace std; using ll = long long; #define rep(i,n) for(int i=0;i<(int)(n);i++) // randxor unsigned int randxor(){ static unsigned int x=123456789,y=362436069,z=521288629,w=88675123; unsigned int t=(x^(x<<11)); x=y;y=z;z=w; return( w=(w^(w>>19))^(t^(t>>8)) ); } struct Field{ vector> vv; vector h,p; int cnt; int turn; int state; ll sum_level; Field(): vv(60,vector(25,-1)),cnt(0),turn(0),state(12),sum_level(0){}; bool shift(){ turn++; int n; cin>>n; if(n==-1){ return 1; } if(vv.at(turn).at(state)>=0){ return 1; } vector v(25,-1); rep(i,n){ int a,b,c; cin>>a>>b>>c; v.at(c)=cnt; h.push_back(a); p.push_back(b); cnt++; } vv.emplace_back(v); return 0; } pair get_near(int x){ for(int i=turn;i=0){ return {i-turn,vv.at(i).at(x)}; } } return {-1,-1}; } ll level(){ return (1+sum_level/100); } void move(){ int bn=0; { auto [dis,nm]=get_near(state); if(nm!=-1){ if(dis*level()>=h.at(nm)){ cout<<"S"<=h.at(nm)){ cout<<"R"<=h.at(nm)){ cout<<"L"<>2&1)){ cout<<"L"<=turn;i--){ rep(j,25) cout<