s = input()
a = s[0:2]
b = s[2:4]
print(hex(int(a)+32)[2:],end="")
print(hex(int(b)+32)[2:],end="H\n")
print(hex(int(a)+32+128)[2:],end="")
print(hex(int(b)+32+128)[2:],end="H\n")
# 20H -> 32
# 80H -> 128
#code by Luthics