#include using namespace std; void fast_io() { ios::sync_with_stdio(false); std::cin.tie(nullptr); } int main() { fast_io(); vector s{""}; string nupc = "NUPC"; for (int i = 0; i < 4; i++) { vector s_new; for (string t : s) { t += nupc[i]; s_new.push_back(t); s_new.push_back(t + t); } swap(s, s_new); } sort(s.begin(), s.end()); int k; cin >> k; cout << s[k - 1] << endl; }