NUMWORD - Number to Word

In this task you just need to convert a number from its digit form to word form.

For example, you should output 'one' for 1, 'thirty seven thousand' for 37000.

You can assume that input will be >= 0 and <= 50000.

Also all numbers will be valid i.e. input will not have numbers like 023.

Input

Input contains one line which is n, 0 <= n <= 50,000.

Output

Output the number in words as specified.

Example

Input:
123
34108

Output:
one hundred twenty three
thirty four thousand one hundred eight

Score: source code length.

Problem was modified on 23/2/2011. Many other languages added as users want, and problem statement changed which lead to no accepted solutions and that is because increasing in test cases number.


Added by:Kawmia Institutes
Date:2011-02-12
Time limit:1s
Source limit:1000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ADA95 ASM32 ASM64 BASH BF CSHARP C99 CLPS CLOJURE LISP sbcl LISP clisp D ERL FSHARP FORTRAN GO ICON ICK JS-RHINO LUA NEM NICE OCAML PIKE PRLG-swi SCALA SCM guile SCM qobi ST TCL WHITESPACE
Resource:XeRon!X problem in opposite way

hide comments
2011-02-27 13:30:14 ahly
i think test cases must be not less that 50 for such problems
2011-02-27 13:30:14 XeRoN!X
extra whitespaces removed

Last edit: 2011-02-22 14:18:22
2011-02-27 13:30:14 numerix
The judge doesn't work correctly!

Last edit: 2011-03-04 11:57:35
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.