#include #define NUM_OF(arr) (sizeof(arr) / sizeof(*arr)) using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int N, i; const int unit[] = { 720, 360, 180, 30, 6, 1 }; const char letter[] = { 'C', 'M', 'S', 'R', 'o', '.' }; cin >> N; for (i = 0; i != NUM_OF(unit); ++i) { while (N >= unit[i]) cout << letter[i], N -= unit[i]; } cout << '\n'; return 0; }