#include #include #include typedef int_fast16_t int16; int main() { int16 n; std::cin>>n; std::string a; std::getline(std::cin,a); for(int i=0;igreen_num){ is_error=true; } } auto last=case_.rbegin(); auto last2=last; ++last2; auto it=last; int red_num_copy=red_num; while(it!=case_.rend()){ if(red_num_copy==0){ if(*it!='G'){ is_error=true; } break; } if(*it=='G'){ break; } if(*it=='R'){ red_num_copy--; } ++it; } if(*last=='W'||*last2=='W'||red_num!=green_num||is_error||case_.size()<3){ std::cout<<"impossible"<