while 1: l,*r=input().split(), while l:a,*l=l;k=int(a[1]);r+=[map(l.pop,[0]*k),r[-k:]]['R'<a] print(*r)
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page