lst = [
'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten',
'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', 'sixteen', 'seventeen',
'eighteen', 'nineteen'
]
dic = {
2 : 'twenty', 3 : 'thirty', 4 : 'forty', 5 : 'fifty', 6 : 'sixty',
7 : 'seventy', 8 : 'eighty', 9 : 'ninety'
}
def eng(n):
if n < 20:
return lst[n - 1]
else:
if n % 10 == 0:
return dic[n // 10]
else:
return dic[n // 10] + ' ' + lst[n % 10 - 1]
while True:
try:
s = input()
if not s.isdigit():
print('error')
continue
sgood = ''
for i, c in enumerate(s[::-1]):
sgood += c
if (i + 1) % 3 == 0:
sgood += ','
sgood = sgood[::-1]
nums = sgood.split(',')
for i, n in enumerate(nums):
if not n:
continue
if len(n) == 3:
if n[0] != '0':
print(eng(int(n[0])), 'hundred', end=' ')
if int(n[1:]) > 0:
print('and', end=' ')
print(eng(int(n[1:])), end=' ')
else:
print(eng(int(n)), end=' ')
else:
print(eng(int(n)), end=' ')
# 单位判断
if len(nums[i:]) == 4:
print('billion', end=' ')
elif len(nums[i:]) == 3:
print('million', end=' ')
elif len(nums[i:]) == 2:
print('thousand', end=' ')
print()
except:
break