#include using namespace std; using ll = long long; using vi = vector; using vvi = vector>; using pii = pair; using vll = vector; using str = string; using vstr = vector; #define PB push_back #define ALL(x) (x).begin() (x).end() #define FOR(i,s,f) for(int (i) = (s); i < (f); i++) int main(){ int n,m,t; cin >>n>>m>>t; FOR(i,0,m){ int x,s,z;char c; cin >> x>>s>>c>>z; str ans =""; if(c == 'L'){ x -= s * t; FOR(i,0,n){ if(i == x) ans += '!'; else if(i < x) ans += '='; else if(i > x and i <=x+z-1) ans += '#'; else ans += '='; } }else{ x+= s* t; FOR(i,0,n){ if(i == x + z -1) ans += '!'; else if(i > x + z) ans += '='; else if (i >= x and i < x+z -1) ans += '#'; else ans += '='; } } cout <