#t197. ISBN号码

ISBN号码

ISBN Number

Problem Description

Every officially published book has an ISBN number. An ISBN code consists of 99 digits, 11 check digit, and 33 separators, in the format "x-xxx-xxxxx-x", where the symbol - is the separator (the minus sign on the keyboard) and the last character is the check digit. For example, 0-670-82162-4 is a standard ISBN code. The first digit of the ISBN indicates the publication language of the book (e.g. 0 means English); the three digits after the first - represent the publisher (e.g. 670 represents Viking Press); the five digits after the second separator represent the book's number within the publisher; and the last character is the check digit.

The check digit is computed as follows:

Multiply the first digit by 11, the second digit by 22, and so on; take the result modulo 1111, and the remainder is the check digit. If the remainder is 1010, the check digit is the uppercase letter X. For example, the check digit 44 in ISBN 0-670-82162-4 is obtained as follows: for the 99 digits 067082162, multiply from left to right by 1,2,…,91, 2, \dots, 9 respectively and sum them up, i.e. 0×1+6×2+⋯+2×9=1580\times 1 + 6\times 2 + \cdots + 2\times 9 = 158, then take 158 mod 11=4158 \bmod 11 = 4 as the check digit.

Your task is to write a program to determine whether the check digit of the input ISBN number is correct. If it is correct, output Right; if it is wrong, output what you think is the correct ISBN number.

Input Format

A single line, a character sequence representing an ISBN number of a book (guaranteed to conform to the ISBN format).

Output Format

One line in total. If the check digit of the input ISBN is correct, output Right; otherwise, output the correct ISBN number (including the - separators) in the required format.

Sample Input 1

0-670-82162-4

Sample Output 1

Right

Sample Input 2

0-670-82162-0

Sample Output 2

0-670-82162-4