#include #include using namespace std; using namespace atcoder; typedef long long ll; typedef long double ld; #define sz(c) ((ll)(c).size()) #define ALL(x) x.begin(),x.end() #define LB(A,x) (ll)(lower_bound(ALL(A),x)-A.begin()) #define UB(A,x) (ll)(upper_bound(ALL(A),x)-A.begin()) #define BS(A,x) binary_search(ALL(A),x) #define rep(i,a,b) for(int i=a;ibool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; } templatebool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; } using vi = vector; using vvi = vector; using li =vector; using lli=vector
  • ; const long long mod=998244353; //using mint = modint998244353; int main() { int n;cin>>n; vi A(n); rep(i,0,n)cin>>A[i]; rep(i,0,n){ rep(j,0,n-1){ if(A[j]>A[j+1]){cout<<"S";swap(A[j],A[j+1]);} cout<<"R"; } cout<<"R"; } /*int r=0; while(true){ if(A[r%n]>A[(r+1)%n]){cout<<"R";swap(A[r%n],A[(r+1)%n]);continue;} bool ok=true; rep(i,0,n){if(A[(i+r)%n]!=B[i])ok=false;} cout<<"S";r++;continue; }*/ cout<