#include "bits/stdc++.h" #define int long long using namespace std; using ll = long long; using P = pair; const ll INF = (1LL << 61); ll mod = 1000000007; signed main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; string S, T; cin >> S >> T; vectors(N), t(N); for (int i = 0; i < N; i++) { s[i] = S[i] - '0'; t[i] = T[i] - '0'; } int Q; cin >> Q; vectora(N, 0); set>st; for (int i = 0; i < N; i++) { if (s[i] < t[i]) { a[i] = -1; st.insert({ i, -1 }); } else if(s[i] > t[i]) { a[i] = 1; st.insert({ i, 1 }); } } for (int _ = 0; _ < Q; _++) { char c; cin >> c; int x, y; cin >> x >> y; x--; int tmp = a[x]; if (c == 'S') { s[x] = y; } else { t[x] = y; } if(tmp != 0)st.erase({ x, tmp }); if (s[x] < t[x]) { a[x] = -1; st.insert({ x, -1 }); } else if (s[x] > t[x]) { a[x] = 1; st.insert({ x, 1 }); } else a[x] = 0; if (st.empty())cout << "=" << endl; else { auto itr = st.begin(); pair p = *itr; if (p.second == 1)cout << ">" << endl; else cout << "<" << endl; } } return 0; }