def represent_balls(N): symbols = [ ('C', 720), ('M', 360), ('S', 180), ('R', 30), ('o', 6), ('.', 1) ] result = [] for symbol, value in symbols: count = N // value result.append(symbol * count) N %= value return ''.join(result) N = int(input()) print(represent_balls(N))