#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) #define P pair void out(int comp) { string res; if (comp == 0) res = ">"; else if (comp == 1) res = "="; else res = "<"; cout << res << endl; } int main() { int n; cin >> n; string s, t; cin >> s >> t; vector vs(n), vt(n); rep(i, n) { vs[i] = s[i]-'0'; vt[i] = t[i]-'0'; } int idx = 0; int compare = 0; rep(i, n) { if (vs[i] == vt[i]) { if (i < n-1) continue; else compare = 1; } else if (vs[i] > vt[i]) { idx = i; compare = 0; break; } else { idx = i; compare = 2; } } 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(compare); else { if (vs[x] > vt[x]) { compare = 0; idx = x; } else if (vs[x] < vt[x]) { compare = 2; idx = x; } out(compare); } } }