LogiQuest

353. Number to Words

HardRecursionFormatting

Write a non-negative integer in English words (international system), e.g. 12345 → Twelve Thousand Three Hundred Forty Five.

Input format

A single integer n.

Output format

The words.

Example 1

Input

123

Output

One Hundred Twenty Three

Example 2

Input

12345

Output

Twelve Thousand Three Hundred Forty Five

Constraints

0 ≤ n ≤ 2³¹ − 1

Read input from standard input and print the answer to standard output. Your code is judged against 6 test cases, most of them hidden.

Loading the MyLoginn IDE…