# -*- coding: utf-8 -*- import itertools def unzip(s: str): t = "" for i in range(8): if (i + 1) % 2 == 0: if s[i] == "1": pass else: # s[i] == 2 t = t + t else: # (i + 1) % 2 == 1 t = t + s[i] return t k = int(input()) candidates = [ "N" + s2 + "U" + s4 + "P" + s6 + "C" + s8 for s2, s4, s6, s8 in itertools.product(["1", "2"], repeat=4) ] order = sorted(map(unzip, candidates)) print(order[k - 1])