Question: Big Description Given a string, with certain lowercase letters. You are allowed to do at most one operation on this string. where, you can delete

Big Description
Given a string, with certain lowercase letters. You are allowed to do at most one operation on this string. where, you can delete an entire substring from the given string, You need to tell, by doing the obowementioned operation at most once, can you creote the string "programming" from the given string.
in case you can, print Yes, else, print No.
Input Format -
The first line of input contains a single integer T. denoting the number of test cases. Then, T strings follow. For each of those strings, you need to tell, if you can generate the substring "programming", by doing the given operation at most once.
Output Format -
Print T lines, where each line sthall contain a single string - Yes (if the job can be done) or No lif the job cannot be done).
Constraints
1-T100
1 string size 1000
Examples
input:
4
 Big Description Given a string, with certain lowercase letters. You are

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!