SuperJAR @ 2024-03-12 13:22:48
#include<iostream>
#include<fstream>
#include <iomanip>
#include <bits/stdc++.h>
#include <math.h>
#include <algorithm>
#include <cstring>
using namespace std;
int main()
{
char a,b,c,d,e,f,g,h,i,x;
scanf("%c-%c%c%c-%c%c%c%c%c-%c",&a,&b,&c,&d,&e,&f,&g,&h,&i,&x);
int k=(a-'0')*1+(b-'0')*2+(c-'0')*3+(d-'0')*4+(e-'0')*5+(f-'0')*6+(g-'0')*7+(h-'0')*8+(i-'0')*9;
int m=k%11;
if(m==(x-'0'))cout<<"Right";
else if(m==10) printf("%c-%c%c%c-%c%c%c%c%c-X",a,b,c,d,e,f,g,h,i);
else printf("%c-%c%c%c-%c%c%c%c%c-%d",a,b,c,d,e,f,g,h,i,m);
return 0;
}