#include #include typedef unsigned long long ULLONG; typedef long long LLONG; static const LLONG MOD_NUM = 1000000007LL; //998244353LL; template static void get(_T& a) { std::cin >> a; } template static void get(_T& a, _T& b) { std::cin >> a >> b; } template static void get(_T& a, _T& b, _T& c) { std::cin >> a >> b >> c; } template static _T tp_abs(_T a) { if (a < (_T)0) { a *= (_T)-1; } return a; } static void task(); int main() { task(); fflush(stdout); return 0; } static void task() { int N; get(N); std::string sS, sT; get(sS, sT); std::map keys; for (int i = 0; i < N; i++) { std::pair key(-1, -1); if (sS[i] < sT[i]) { keys[i] = 0; } else if (sS[i] > sT[i]) { keys[i] = 1; } } int Q; get(Q); char mark[] = { '<', '>' }; for (int q = 0; q < Q; q++) { char c; get(c); int targ, num; get(targ, num); targ--; if (c == 'T') { sT[targ] = num + '0'; } else { sS[targ] = num + '0'; } if (sT[targ] > sS[targ]) { keys[targ] = 0; } else if (sT[targ] < sS[targ]) { keys[targ] = 1; } else { if (keys.find(targ) != keys.end()) keys.erase(targ); } if (keys.size()) { printf("%c\n", mark[keys.begin()->second]); } else { printf("=\n"); } } }