#include using namespace std; using ll = long long; ll inf = (1LL<<60); int main() { int T; cin >> T; while(T){ T--; string str,ptn; int x; cin >> str >> ptn >> x; int len = str.length(); if(ptn == "Warong"){ bool check = true; queue que; for(int i=0;ique; for(int i=0;i