

#include <stdio.h>
#include <stdlib.h>
//洛谷1149
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#define N 13
int main(int argc, char *argv[]) {
int i,s=0,j=1;
char ISBN[N];
for(i=0;i<N-1;i++)//输入ISBN码
{
if(i==1||i==5||i==11)
{
ISBN[i]='-';
i++;
}
else
{
scanf("%c",ISBN[i]);
s+=((ISBN[i]-'0')*(j++));
}
}
if(ISBN[i]==(s%11))
printf("Right");
else
{
for(i=0;i<N;i++)
{
if(i!=12)
{
printf("%c",ISBN[i]);
}
else
{
ISBN[i]=s%11;
printf("%c",ISBN[i]);
}
}
}
return 0;
}
