#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair string s, t; vector vs, vt; int n, param; void out(int comp) { string res; if (comp == 0) res = ">"; else if (comp == 1) res = "="; else res = "<"; cout << res << endl; } void compare(int& idx) { for (int i = idx; i < n; i++) { if (vs[i] > vt[i]) { param = 0; idx = i; break; } else if (vs[i] < vt[i]) { param = 2; idx = i; break; } else { if (i < n-1) continue; param = 1; idx = i; } } return; } int main() { cin >> n; cin >> s >> t; vs.resize(n), vt.resize(n); rep(i, n) { vs[i] = s[i]-'0'; vt[i] = t[i]-'0'; } int idx = 0; compare(idx); int q; cin >> q; rep(i, q) { char c; int x, y; cin >> c >> x >> y; x--; if (c == 'S') vs[x] = y; else vt[x] = y; if (x > idx) out(param); else { compare(idx); out(param); } } }