#include<iostream> #include<sstream> #include<string> #include<vector> #include<cmath> using namespace std; int main() { int i=1, j[100], k[100], l=0, o=0; string s, s1[100], s2, s3; stringstream ss, ss1; while (cin>>s) { s.erase(11, 1); s.erase(5, 1); s.erase(1, 1); l = 0; for (i = 0; i < s.length() - 1; i++) { l = l + ((int)s[i] - 48)*(i + 1); } l = l % 11; if (l == (int)s[s.length() - 1]-48) { cout << "Right" << endl; } else { if (l == 10) { s.erase(9, 1); s2 = "X"; s.insert(1, "-"); s.insert(5, "-"); s.insert(11, "-"); cout << s + s2 << endl; } else { ss << l; s.erase(9, 1); ss >> s2; s.insert(1, "-"); s.insert(5, "-"); s.insert(11, "-"); cout << s + s2 << endl; } } } return 0; }