#include using namespace std; #include #include using namespace atcoder; using ll = long long; using vll = vector; using vvll = vector; using vvvll = vector; using vb = vector; using vvb = vector; using vvvb = vector; #define all(A) A.begin(),A.end() #define rep(i, n) for (ll i = 0; i < (ll) (n); i++) int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll N,Q; string S,T; cin>>N>>S>>T>>Q; set P; rep(i,N)if(S[i]!=T[i])P.insert(i); rep(q,Q){ char C,Y; ll X; cin>>C>>X>>Y; X--; if(P.count(X))P.erase(X); (C=='S'?S:T)[X]=Y; if(S[X]!=T[X])P.insert(X); if(P.size()==0)cout<<"="<")<