14 10 s 128 MB
Number guessing is a popular game between elementary-school kids. Teachers encourage pupils to play the game as it enhances their arithmetic skills, logical thinking, and following-up simple procedures. We think that, most probably, you too will master in few minutes. Here's one example of how you too can play this game: Ask a friend to think of a number, let's call it n_{0}.
Then:
Here's an example that you can follow: If n_{0} = 37, then n_{1} = 111 which is odd. Now we can calculate n_{2} = 56, n_{3} = 168, and n_{4} = 18, which is what your friend will tell you. Doing the calculation 2 x n_{4} + 1 = 37 reveals n_{0}.
Your program will be tested on one or more test cases. Each test case is made of a single positive number (0 < n_{0} < 1, 000, 000). The last line of the input file has a single zero (which is not part of the test cases.)
For each test case, print the following line:
k. B Q
Where k is the test case number (starting at one,) B is either `even' or `odd' (without the quotes) depending on your friend's answer in step 1. Q is your friend's answer to step 4.
Sample Input | Sample Output |
---|---|
37 38 0 | 1. odd 18 2. even 19 |