#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
while(cin>>s){
char flag;
if(s=="99999"){
break;
}
if((s[0]-'0')+(s[1]-'0')&1){
cout<<"left "<<s[2]<<s[3]<<s[4]<<'\n';
flag='l';
}
if((!(s[0]-'0')+(s[1]-'0')&1)&&(s[0]-'0')+(s[1]-'0')!=0){
cout<<"right "<<s[2]<<s[3]<<s[4]<<'\n';
flag='r';
}
if((s[0]-'0')+(s[1]-'0')==0){
if(flag=='l'){
cout<<"left "<<s[2]<<s[3]<<s[4]<<'\n';
}else{
cout<<"right "<<s[2]<<s[3]<<s[4]<<'\n';
}
}
}
return 0;
}
回复有关