#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(int i=0;i> K; queue q; q.push("N"); q.push("U"); q.push("P"); q.push("C"); while(1){ string s=q.front(); int n=s.size(); if(n==8) break; q.pop(); if(n%2==0){ q.push(s+"N"); q.push(s+"U"); q.push(s+"P"); q.push(s+"C"); }else{ q.push(s+"1"); q.push(s+"2"); } } vector v; while(!q.empty()){ string s=q.front(); q.pop(); if(!(s[0]=='N' && s[2]=='U' && s[4]=='P' && s[6]=='C')) continue; string t; for(i=0;i<8;i++){ if(i%2==0) t+=s[i]; else{ if(s[i]=='2') t+=t; } } v.push_back(t); } sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); cout << v[K-1] << endl; return 0; }