puts f(eval gets).split*" "until def f n l=%w"twen thir fo%sr fif six seven eigh nine" n>99?[f(n/d=10**" "[k=-"#{n}".size/3]),%w{billion million thousand hundred}[k],f(n%d)]*$/:n<20?%W{\r one two three four five six seven eight nine ten eleven twelve}[n]||l[n-12]%:u+"teen":l[n/10-2]%p+"ty "+f(n%10)end