#include using namespace std; using ll = long long; #define rep(i, n) for(int i = 0; i < n; i++) int main() { int N; cin >> N; string t = "NUPC"; int l = 1 << 4; vector vs; rep(mask, l) { string s, ss; rep(i, 8) { int j = i / 2; if(i % 2) { if(mask >> j & 1) s += '1'; else s += '2'; } else s += t[j]; } rep(i, 8) { if(i % 2) { if(s[i] == '2') ss = ss + ss; } else ss += s[i]; } vs.push_back(ss); } sort(vs.begin(), vs.end()); N--; cout << vs[N] << endl; }