#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { fast_io(); int n; cin >> n; vector unit = {720, 360, 180, 30, 6, 1}; string cur = "CMSRo."; string ans = ""; for (int i = 0; i < 6; i++) { for (int j = 0; j < n / unit[i]; j++) { ans += cur[i]; } n %= unit[i]; } cout << ans << endl; }