#include using namespace std; int main(){ int n; cin>>n; int p[n]; for(int i=0;i>p[i]; string ans=""; auto Swap=[&](){ swap(p[0],p[1]); ans+="S"; }; auto Rotate=[&](){ int x=p[0]; for(int i=0;i=0;x--){ while(p[0]!=x) Rotate(); while(p[1]!=x+1){ Swap(); Rotate(); } } cout<