#include<bits/stdc++.h> using namespace std; #define int long long string s; void solve() { ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); cin>>s; string temp="qihangcang"; int pos=s.find(temp); if(pos>=0) { cout<<"Yes"<<endl; for(int i=0;i<s.find(temp);i++) cout<<s[i]; } else if(pos>=s.size()){ cout << "No"; } cout<<endl; } signed main() { int k; cin>>k; while(k--){ solve(); } }

0 comments

No comments so far...