#include using namespace std; using ll = long long; using ull = unsigned long long; using ld = long double; using pii = pair; using vi = vector; using vll = vector; #define elif else if int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, m, t; cin >> n >> m >> t; while (m--) { int p, s, l; char d; cin >> p >> s >> d >> l; pii pos; if (d == 'R') pos = {p + s*t, p+l -1 + s*t}; else pos = {p - s*t, p+l -1 - s*t}; for (int i = 0; i < n; ++i) { if (i == pos.first && d == 'L') cout << "!"; elif (i == pos.second && d == 'R') cout << "!"; elif (i < pos.first || i > pos.second) cout << "="; else cout << "#"; } cout << endl; } }