#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair int main() { int n; cin >> n; string s, t; cin >> s >> t; int q; cin >> q; set st; rep(i, n) if (s[i] != t[i]) st.insert(i); rep(i, q) { char c; int x, y; cin >> c >> x >> y; x--; if (c == 'S') s[x] = y+'0'; else t[x] = y+'0'; if (s[x]!=t[x]) st.insert(x); else if (s[x]==t[x]) st.erase(x); bool flag = false; if (st.size() == 0) { cout << "=" << endl; continue; } for (auto idx : st) { flag = true; if (s[idx] > t[idx]) cout << ">" << endl; else if (s[idx] < t[idx]) cout << "<" << endl; if (flag) break; } } }