#include #include using namespace std; int N,Q; string S,T; main() { cin>>N>>S>>T>>Q; setL,R; L.insert(N); R.insert(N); for(int i=0;iT[i])L.insert(i); } for(;Q--;) { char c; int x,y;cin>>c>>x>>y; x--; if(S[x]T[x])L.erase(x); if(c=='S')S[x]=y+'0'; else T[x]=y+'0'; if(S[x]T[x])L.insert(x); int l=*L.begin(),r=*R.begin(); cout<<(l\n":l>r?"<\n":"=\n"); } }