fn main() { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); let k: usize = s.trim().parse().unwrap(); let n = ['N', 'U', 'P', 'C']; let mut a = Vec::new(); for i in 0..16 { let mut s = String::new(); for j in 0..4 { s.push(n[j]); if i >> j & 1 == 1 { s = s.repeat(2); } } a.push(s) } a.sort(); println!("{}", a[k - 1]) }