/** * @FileName a.cpp * @Author kanpurin * @Created 2021.03.28 14:51:59 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n;cin >> n; string s,t;cin >> s >> t; int q;cin >> q; set st; vector exist(n,false); for (int i = 0; i < n; i++) if (s[i] != t[i]) st.insert(i), exist[i]=true; while(q--) { char c; int x,y;cin >> c >> x >> y; if (c == 'S') s[x-1] = char(y+'0'); else t[x-1] = char(y+'0'); if (s[x-1] != t[x-1]) { if (!exist[x-1]) st.insert(x-1); exist[x-1]=true; } else { if (exist[x-1]) st.erase(x-1); exist[x-1]=false; } if (st.empty()) cout << "=" << endl; else { int k = *(st.begin()); if (s[k] < t[k]) cout << '<' << endl; else cout << '>' << endl; } } return 0; }