Raymond is good at sequences. He has made a puzzle that no one in his class could solve. It involves taking a number, finding the number of letters it has, then making this number the new number, and doing this over and over again to form a sequence. Raymond found that he would always end up repeating forever at the number , because it has 4 letters, `four`

. He showed some sample sequences to get , but none of his classmates could solve the puzzle. He is exhausted from having to count out new patterns, so he gives the task to you. You must write a program to display the sequence from an input to 4.

#### Numbers

You will use the following spellings:

```
1 = one 11 = eleven 30 = thirty 1000 = onethousand
2 = two 12 = twelve 40 = forty 1090 = onethousandninety
3 = three 13 = thirteen 50 = fifty 2500 = twothousandfivehundred
4 = four 14 = fourteen 60 = sixty 5123 = fivethousandonehundredtwentythree
5 = five 15 = fifteen 70 = seventy 10 000 = tenthousand
6 = six 16 = sixteen 80 = eighty 100 000 = onehundredthousand
7 = seven 17 = seventeen 90 = ninety 1 000 000 = onemillion
8 = eight 18 = eighteen 100 = onehundred 10 000 000 = tenmillion
9 = nine 19 = nineteen 101 = onehundredone 100 000 000 = onehundredmillion
10 = ten 20 = twenty 200 = twohundred 1 000 000 000 = onebillion
```

*Note: There are no spaces.*

#### Input Specification

The input will consist of an integer , the number to start the sequence.

#### Output Specification

Output one integer on each line the sequence from (exclusive) to (inclusive).

*Note: Do not prompt for input, as this will cause the judge to take the prompt as the solution.*

#### Sample Input 1

`6`

#### Sample Output 1

```
3
5
4
```

#### Explanation for Sample Output 1

is spelled as `six`

, which has 3 letters, so the next number will be .
is spelled as `three`

, which has 5 letters, so the next number will be .
is spelled as `five`

, which has 4 letters, so the next number will be .
Once is reached, the sequence is over.

#### Sample Input 2

`101`

#### Sample Output 2

```
13
8
5
4
```

#### Explanation for Sample Output 2

is spelled as `onehundredone`

, which has 13 letters, so the next number will be .
is spelled as `thirteen`

, which has 8 letters, so the next number will be .
is spelled as `eight`

, which has 5 letters, so the next number will be .
is spelled as `five`

, which has 4 letters, so the next number will be .
Once is reached, the sequence is over.

## Comments

It's telling me that a bunch of my answers are wrong when they should be right. for example, it told me that this output was wrong:

75 11 6 3 5 4

But if you count it up, seventyfive is 11 letters, eleven is 6 letters, six is 3, three is 5 and five is 4. So this is a correct answer.

What am I doing wrong that's making it return as a wrong answer?

the input number is never printed

I'm not printing the input number. 75 is the number of letters for the input. I still don't understand what's wrong.

Your code outputs

`onebilliontwohundredthirtymillionfivehundredsixtyseventhousandandeighthundredninety`

when the input is`1234567890`

. In addition, you don't print`and`

after the thousands place.`onethousandeighthundred`

not`onethousandandeighthundred`

.does the problem only use the numbers in the list above or do we have to solve for every possible number

The problem can use any combination of the numbers above, for example 113, which is hundredthirteen

What does it mean when it says "Do not prompt for input"?

that means don't print anything like (for example):

`enter a number`

or something of that sort, only print the output that is`specified`

in the problem statementIn the question, how would you name the number 1947471476?

1,947,471,476

onebillionninehundredfortysevenmillionfourhundredseventyonethousandfourhundredseventysix

Probably just put in each unit like the others, separating by million/thousand (word form)

ok, so how do you make 7 into seven?

Hint:Think about storing the words into an array (or vector or Arraylist)Hey, I just spent a lot of time on my Python code (that I hope works properly). However, when I went to submit it, I found out that the library that I used can't be imported. I was wondering if there is a way to fix that (or at least if there is a way to know what libraries can't be used for the future). Thanks!

Only packages included in a standard CPython installation are available. That excludes pretty much everything on PyPI.

Okay, thanks a lot!

Explanation for Sample Output 2onehundredone = 13 letters, thirteen = 8 letters

Fixed it.