# import pypyjit # pypyjit.set_param('max_unroll_recursion=-1') from collections import defaultdict as dd S = input R = range P = print def I(): return int(S()) def M(): return map(int, S().split()) def L(): return list(M()) def O(): return list(map(int, open(0).read().split())) def yn(b): print("Yes" if b else "No") biga = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" smaa = "abcdefghijklmnopqrstuvwxyz" n = I() ans = "" ans += 'C' * (n // 720) n %= 720 ans += 'M' * (n // 360) n %= 360 ans += 'S' * (n // 180) n %= 180 ans += 'R' * (n // 30) n %= 30 ans += 'o' * (n // 6) n %= 6 ans += '.' * n print(ans)