a="1"
b="2"
c="3"
d="4"
e="5"
f="8"
g="3"
h="5"
i="1"
j="1"
k="2"
l="3"
m="4"
n="5"
o="7"
p="8"
q="5"
r="2"
s="3"
t="4"
u="6"
v="6"
w="6"
x="5"
y="1"
z="5"
user_name = input()
print("Name: "+user_name)
num = ""
for i in user_name:
i = i.lower()
if i == "a":
num += a
elif i == "b":
num += b
elif i == "c":
num += c
elif i == "d":
num += d
elif i == "e":
num += e
elif i == "f":
num += f
elif i == "g":
num += g
elif i == "h":
num += h
elif i == "i":
num += "1"
elif i == "j":
num += j
elif i == "k":
num += k
elif i == "l":
num += l
elif i == "m":
num += m
elif i == "n":
num += n
elif i == "o":
num += o
elif i == "p":
num += p
elif i == "q":
num += q
elif i == "r":
num += r
elif i == "s":
num += s
elif i == "t":
num += t
elif i == "u":
num += u
elif i == "v":
num += v
elif i == "w":
num += w
elif i == "x":
num += x
elif i == "y":
num += y
elif i == "z":
num += z
print(num)
nums = num
sum = 0
newSum = ""
sum1 = sum
count = 0
hebrew = ""
num1 = ""
for i in range(len(num)-1):
for j in num:
try:
sum = int(num[count]) + int(num[count+1])
except:
break
if sum > 9:
newSum += str(int(str(sum)[0]) + int(str(sum)[1]))
else:
newSum += str(sum)
count += 1
count = 0
if int(newSum) < 10:
break
num = newSum
print((" "*(i+1))+newSum)
newSum = ""
print("")
total = 0
for i in nums:
total += int(i)
print("Total: "+str(total))
print("Hebrew: "+num)
num = input()
print("DOB: "+num)
nums = num
sum = 0
newSum = ""
sum1 = sum
count = 0
hebrew = ""
num1 = ""
for i in range(len(num)-1):
for j in num:
try:
sum = int(num[count]) + int(num[count+1])
except:
break
if sum > 9:
newSum += str(int(str(sum)[0]) + int(str(sum)[1]))
else:
newSum += str(sum)
count += 1
count = 0
if int(newSum) < 10:
break
num = newSum
print((" "*(i+1))+newSum)
newSum = ""
print("")
total = 0
for i in nums:
total += int(i)
print("Total: "+str(total))
print("Hebrew: "+num)