/* -*- coding: utf-8 -*- * * 1439.cc: No.1439 Let's Compare!!!! - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 200000; /* typedef */ typedef set si; /* global variables */ char s[MAX_N + 4], t[MAX_N + 4]; si ks; /* subroutines */ /* main */ int main() { int n, qn; scanf("%d%s%s%d", &n, s, t, &qn); for (int i = 0; i < n; i++) if (s[i] != t[i]) ks.insert(i); while (qn--) { char cs[4]; int x, y; scanf("%s%d%d", cs, &x, &y); x--; char yc = '0' + y; if (cs[0] == 'S') { if (s[x] == t[x] && yc != t[x]) ks.insert(x); else if (s[x] != t[x] && yc == t[x]) ks.erase(x); s[x] = yc; } else { if (s[x] == t[x] && s[x] != yc) ks.insert(x); else if (s[x] != t[x] && s[x] == yc) ks.erase(x); t[x] = yc; } if (! ks.empty()) { int z = *ks.begin(); if (s[z] < t[z]) puts("<"); else puts(">"); } else puts("="); } return 0; }