fn main() { let n = { let mut buf = String::new(); std::io::stdin().read_line(&mut buf).unwrap(); buf.trim().parse::().unwrap() }; let (c, m, s, r, o, dot) = { fn div_rem(a: usize, b: usize) -> (usize, usize) { (a / b, a % b) } let (c, n) = div_rem(n as usize, 720); let (m, n) = div_rem(n, 360); let (s, n) = div_rem(n, 180); let (r, n) = div_rem(n, 30); let (o, dot) = div_rem(n, 6); (c, m, s, r, o, dot) }; println!( "{}{}{}{}{}{}", "C".repeat(c), "M".repeat(m), "S".repeat(s), "R".repeat(r), "o".repeat(o), ".".repeat(dot) ); }