d = [(720, 'C'), (360, 'M'), (180, 'S'), (30, 'R'), (6, 'o'), (1, '.')] n = int(input()) ans = [] while n: for x, c in d: if n >= x: n -= x ans.append(c) break print(''.join(ans))