var
s,s1:string[13];
i,j,k,l,n,m:longint;
begin
readln(s);
l:=1;
n:=n+ord(s[1])-48;
s1:=s1+copy(s,1,2);
delete(s,1,2);
for i:=3 to 5 do
begin
l:=l+1;
n:=n+(ord(s[1])-48)*l;
s1:=s1+copy(s,1,1);
delete(s,1,1);
end;
s1:=s1+copy(s,1,1);
delete(s,1,1);
for i:=7 to 11 do
begin
l:=l+1;
n:=n+(ord(s[1])-48)*l;
s1:=s1+copy(s,1,1);
delete(s,1,1);
end;
s1:=s1+copy(s,1,1);
delete(s,1,1);
n:=n mod 11;
if n=10
then s1[13]:='X';
if n=ord(s1[13])-48
then writeln('Right')
else if (s1[13]='X')and(n=10)
then writeln('Right')
else begin
for i:=1 to 12 do
write(s1[i]);
write(chr(n+48));
end;
end.
Pascal的