#include using namespace std; using ll = long long; void solve() { bool red=false; for(int i=0; i<8; ++i) { string s; cin>>s; if(s=="RRRRRRRR") red=true; } if(red) cout<<"R"<> TC; cin.ignore(); while (TC--) solve(); }