#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #define REP(i,a,b) for(i=a;i-1;i--) { if(S[i] == 'W') possible = false; else if(S[i] == 'B') break; } // 3本以上走ってるか return possible; } int main(void) { int i,j,k,l; int T; char S[1005] = ""; cin >> T; while(cin >> S) { if(possible(S)) puts("possible"); else puts("impossible"); } return 0; }