var a,c,RES:string; i,m,b:longint; v:char; begin assign(input,'isbn.in'); reset(input); assign(output,'isbn.out'); rewrite(output); readln(a); c:=a; delete(a,2,1); delete(a,5,1); delete(a,10,1); for i:=1 to 9 do m:=m+(ord(a[i])-48)*i; m:=m mod 11; if m<10 then if c[13]=chr(m+48) then c:='Right' else c[13]:=chr(m+48); if m=10 then if c[13]='X' then c:='Right' else c[13]:='X'; writeln(c); close(input); close(output); end.