#include using namespace std; int main() { int n; cin >> n; vector num = {720, 360, 180, 30, 6, 1}; vector ch = {'C', 'M', 'S', 'R', 'o', '.'}; string ans = ""; for (int i = 0; i < 6; i++) { int q = n / num[i]; for (int j = 0; j < q; j++) { ans += ch[i]; } n %= num[i]; } cout << ans << endl; }