Hide That Number#1626

Hide That Number

1 second
64 megabytes
Very easy

According to Wikipedia, cryptography is "the practice and study of hiding information," and this is exactly what Alex is looking for. Ever since he was a child, Alex has been paranoid about someone getting access to his phone book. He decided that he must write the numbers in a secret way that only he could decipher. At first, he tried quite complex algorithms, but that slowed him down when he needed to dial a number quickly. Finally, he came up with the following algorithm: instead of writing the number itself, Alex would shift the number one place to the left (as if multiplying by ), then add the shifted number to the original. For example, if the phone number was , Alex would add to it, resulting in . To make it look like a regular phone number, Alex truncates the result (from the left), so that it has as many digits as the original phone number. In this example, Alex writes instead of in his phone book.

Alex needs a program to print the original phone number, given what is written in his phone book. By the way, Alex, who is a good friend of Johnny, is not very good at arithmetic. It is quite possible that the numbers are messed up. The program should print IMPOSSIBLE (without quotes) if the original number cannot be computed.

Input

Your program will be tested on one or more test cases. Each case is specified on a separate line and consists of a single positive number having less than digits.

The last line of the input file consists of a single zero.

Output

For each test case, output the result on a single line in the following format:

k. result

Where is the test case number (starting at ).

Examples

Example 1

Loading
Loading