import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner ss = new Scanner(System.in);
String str = ss.nextLine();
char str1[] = str.toCharArray();
int[] str2 = new int[13];
int i = 0,j = 0,sum = 0,k=0;
for(i = 0;i<13&&j<13;i++)
{
if(i != 1&&i != 5&&i != 11)
{
str2[j] = (int)str1[i]-48;
j++;
}
else
{
continue;
}
}
for(i = 0;i sum += str2[i]*(i+1); } sum = sum%11; if(sum == str2[9]) System.out.println("Right"); else { for(k = 0;k<9;k++){ if((k==1)||(k==4)){ System.out.print("-" + str2[k]); } else{ System.out.print(str2[k]); } } System.out.println("-" + sum); } } }