#P1001. ISBN
ISBN
Description
Every officially published book has an ISBN number corresponding to it. The ISBN code consists of a 9 digit number, a 1 digit identifier, and a 3 digit delimiter. Its specified format is , where the symbol - is the delimiter (a minus sign on the keyboard) and the last digit is the identifier. For example, is a standard ISBN code. The first digit of the ISBN code indicates the publishing language of the book, for example, represents English; The three digits after the first delimiter represent the publishing house, for example, represents Viking Publishing House; The five digits after the second delimiter represent the number of the book published by the publisher; The last digit is the identification code.
The calculation method of the identification code is as follows:
Multiply the first digit by and the last digit by , and so on. Use the result to obtain the remainder, which is the identification code. If the remainder is , the identification code is the uppercase letter . For example, the identification code in the number is obtained as follows: multiply the digits from left to right by $1, $2,..., , and then add them up, which is . Then take the result of as the identification code.
Your task is to write a program to determine if the identification code in the number input is correct. If it is correct, only will be output; If there is an error, output the number that you believe is correct.
Enter description
A character sequence representing the number of a book (ensuring that the input conforms to the format requirements of the number).
Output description
a If the identification code of the number entered is correct, output . Otherwise, output the correct number (including the delimiter ) according to the specified format.