#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int compare(int y, int x) { if (y < x) { return -1; } else if (y > x) { return 1; } else { return 0; } } int main() { int N; cin >> N; string S, T; cin >> S; cin >> T; int Q; cin >> Q; int nums[N][2]; set idx_list; for (int i = 0; i < N; ++i) { nums[i][0] = S[i] - '0'; nums[i][1] = T[i] - '0'; idx_list.insert(i); } char c; int x, y, state; for (int i = 0; i < Q; ++i) { cin >> c >> x >> y; --x; idx_list.insert(x); if (c == 'S') { nums[x][0] = y; } else { nums[x][1] = y; } while (!idx_list.empty()) { int idx = *idx_list.begin(); state = compare(nums[idx][0], nums[idx][1]); if (state != 0) break; idx_list.erase(idx); } switch(state) { case -1: cout << "<" << endl; break; case 0: cout << "=" << endl; break; case 1: cout << ">" << endl; break; } } return 0; }