#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { vector s; rep(i, 2) rep(j, 2) rep(k, 2) rep(l, 2) { string t = "N"; t += to_string(i); t += 'U'; t += to_string(j); t += 'P'; t += to_string(k); t += 'C'; t += to_string(l); s.push_back(t); } vector ans; for (auto x : s) { string t = ""; for (char c : x) { if (isdigit(c)) { if (c == '1') t = t + t; } else { t += c; } } ans.push_back(t); } sort(ans.begin(), ans.end()); int k; cin >> k; cout << ans[k - 1] << endl; return 0; }