#include using namespace std; #define rep(i, n) for (int i=0; i> N; string S, T; cin >> S >> T; set s; rep(i, N) if (S[i]!=T[i]) s.insert(i); int Q; cin >> Q; while (Q--) { char c; int x; char y; cin >> c >> x >> y; x--; if (c=='S') S[x] = y; else T[x] = y; if (s.find(x)!=s.end() && S[x]==T[x]) s.erase(x); if (s.find(x)==s.end() && S[x]!=T[x]) s.insert(x); if (s.size()==0) cout << '=' << endl; else if (S[*s.begin()]>T[*s.begin()]) cout << '>' << endl; else cout << '<' << endl; } }