#include using namespace std; #include #include #include #include #include template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i,n) for (int i = 0; i < (n); ++i) typedef long long ll; using P=pair; const int INF=1001001001; const int mod=1e9+7; int main(){ int n,q; string s,t; cin>>n>>s>>t>>q; auto check=[&](string l,string r){ if(l.size()==r.size()){ if(lr){return 1;} if(l==r){return 0;} } else{ if(l.size()r.size()){return 1;} } }; rep(i,q){ char c; int x,y; cin>>c>>x>>y; x--;y--; if(c=='S'){s[x]=char(y+1+'0');} else{t[x]=char(y+1+'0');} if(check(s,t)==-1){cout<<'<'<'<