#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i) #define all(a) (a).begin(),(a).end() int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); int N; cin >> N; vector num = {720, 360, 180, 30, 6, 1}; vector c = {'C', 'M', 'S', 'R', 'o', '.'}; rep(i, 0, 6) { int times = N / num[i]; rep(j, 0, times) cout << c[i]; N %= num[i]; } cout << '\n'; }