#include #include using namespace std; string solve(string str){ # define OK "possible" # define NG "impossible" int n = str.size(), w=0, g=0; if(str[n-1] != 'R') return NG; for(int i=0; i> n; for(int i=0; i> str; cout << solve(str) << endl; } }