#include using namespace std; const int INF = 1 << 25; const string good = "good"; const string problem = "problem"; int main(){ int T; cin >> T; while(T--){ string S; cin >> S; int N = (int)S.size(); vector G(N, INF), P(N, INF); for(int i=0;i=0;i--){ int s = i; int t = s + (int)problem.size() - 1; if(t >= N) continue; int dif = 0; for(int j=0;j