ll@n,@p[n]; string z; rep(n){ rrep(i,n){ if(i){ if(p[0]>p[1]){ swap(p[0],p[1]); z+="S"; } } rep(j,n-1){ swap(p[j],p[j+1]); } z+="R"; } } wt(z);