Problem1266--isbn

1266: isbn

[Creator : ]
Time Limit : 1 sec  Memory Limit : 128 MB

Description

Each published book has an ISBN number corresponding to it, the ISBN code includes 9 digits, 1-bit identifier and 3-bit separator, its specified format such as "X-xxx-xxxxx-x", where the symbol "-" is the separator (keyboard minus), the last one is the identification code, For example, 0-670-82162-4 is a standard ISBN code. 
The first digit of the ISBN code denotes the publication language of the book, for example, 0 represents English; the three digits after the first delimiter "-" represent the publishing house, for example 670 represents the Virgin publishing house; the five digits after the second delimiter represent the number of the book in the publisher; The identification code is calculated as follows: the first digit multiplied by 1 plus the secondary digit multiplied by 2 ... And so on, with the resulting mod 11, the remainder is the identification code, and if the remainder is 10, the identifier is uppercase X. For example, in the ISBN number 0-670-82162-4 4 is obtained: 067082162 of these 9 digits, from left to right, multiplied by 1,2,...,9, then sum, that is, 0x1+6x2+......+2x9=158, and then take 158 mod 
   11 result 4 as identification code. Your task is to write a program to determine whether the code in the ISBN number entered is correct, if correct, only output "right", if the error, the output you think is the correct ISBN number.

Input

Enter only one line, a sequence of characters that represents the ISBN number of a book (guaranteed to enter the format required for the ISBN number). 

Output

Just one line, if the input is right, output "Right" . Otherwise, the correct ISBN number (including separator "-") is printed in the specified format.

Sample Input Copy

0-670-82162-4
0-670-82162-0

Sample Output Copy

Right
0-670-82162-4

Source/Category

JoyOI