ll n;string s; ll f(ll t){ ll a=0,b=0; rep(i,n){ if(s[i]=='A'||s[i]=='?'&&i