import sys input = sys.stdin.readline N=int(input()) ANS="" while N>0: if N>=720: ANS+="C" N-=720 elif N>=360: ANS+="M" N-=360 elif N>=180: ANS+="S" N-=180 elif N>=30: ANS+="R" N-=30 elif N>=6: ANS+="o" N-=6 elif N>=1: ANS+="." N-=1 print(ANS)