#include #include #include #include using namespace std; int main(void) { int n; cin >> n; string s, t; cin >> s >> t; priority_queue, greater> que; for (int i = 0; i < n; ++i) { if (s[i] != t[i]) que.push(i); } int q; cin >> q; while (q--) { char c; int x, y; cin >> c >> x >> y; if (c == 'T') t[x-1] = y + '0'; else s[x-1] = y + '0'; if (s[x-1] != t[x-1]) que.push(x-1); while (!que.empty()) { int idx = que.top(); if (s[idx] == t[idx]) { que.pop(); continue; } if (s[idx] < t[idx]) cout << "<" << endl; else cout << ">" << endl; break; } if (que.empty()) cout << "=" << endl; } }