/** * author: shu8Cream * created: 26.03.2021 21:18:29 **/ #include using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair; using vi = vector; using vvi = vector; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int n,q; string s,t; cin >> n >> s >> t >> q; rep(_,q){ char c; int x,y; cin >> c >> x >> y; x--; if(c=='S') s[x]=char('0'+y); if(c=='T') t[x]=char('0'+y); if(s==t) cout << "=" << endl; if(s>t) cout << ">" << endl; if(s