#include #include using namespace std; inline void query(unsigned int& st, int x, int y, int N) { int de=pow(10,N-x); st -= (st/de)%10 * de; st += y*de; } int main() { unsigned int N,S,T,Q; cin >> N >> S >> T >> Q; char c; int x,y; for(int i=0; i> c >> x >> y; if(c == 'S') { query(S,x,y,N); }else{ query(T,x,y,N); } if(S > T) cout << '>' << endl; else if(T == S) cout << '=' << endl; else cout << '<' << endl; } return 0; }