#include using namespace std; int main(){ using ll=long long; int n,q; string s; cin>>n>>q>>s; int top=-1; for (int i=0;i>t>>x; if (x<=top){ cout<len) x-=len; else{ string next; next+=c; if (c=='w') next="warong"; if (c=='a') next="answer"; swap(now,next); break; } } t--; } cout<