import os
import sys
# 请在此输入您的代码
n = int(input())
# s1 = "甲乙丙丁戊己庚辛壬癸"
s1 = ["jia", "yi", "bing", "ding", "wu", "ji", "geng", "xin", "ren", "gui"]
# s2 = "子丑寅卯辰四吴伟申酉戌亥"
s2 = ["zi", "chou", "yin", "mao", "chen", "si",
"wu", "wei", "shen", "you", "xu", "hai"]
result = ""
# 公元40年为庚子年,i=6,j=0
start = 0
i = 6
j = 8
for k in range(abs(n-start) % 60):
i += 1
j += 1
if i == 10:
i = 0
if j == 12:
j = 0
print(s1[i], s2[j], sep="")