#include #include using namespace std; int main() { int n; cin >> n; string s, t; cin >> s >> t; set st; for(int i = 0; i < n; i++){ if(s[i] != t[i]) st.insert(i); } int q; cin >> q; while(q--){ char c; int x, y; cin >> c >> x >> y; x--; if(c == 'S') s[x] = char('0' + y); else t[x] = char('0' + y); if(s[x] != t[x]) st.insert(x); else st.erase(x); if(st.empty()) cout << '=' << endl; else if(s[*st.begin()] < t[*st.begin()]) cout << '<' << endl; else cout << '>' << endl; } }