#include using namespace std; string decode(string S) { string ret; for( int i = 0; i < 8; i++ ) { if( i%2 == 0 ) { ret += S[i]; }else if( S[i] == '2' ) { ret += ret; } } return ret; } int main() { int K; cin >> K; vector v(16); for( int s = 0; s < 16; s++ ) { string crypto = "NNUUPPCC"; crypto[1] = "12"[(s>>0)&1]; crypto[3] = "12"[(s>>1)&1]; crypto[5] = "12"[(s>>2)&1]; crypto[7] = "12"[(s>>3)&1]; v[s] = decode(crypto); } sort(v.begin(), v.end()); cout << v[K-1] << endl; }