#include #define rep(i,a,b) for(int i = a; i < (b); ++i) #define sz(x) (int)(x).size() using namespace std; using ll = long long; using pi = pair; using vi = vector; char get_symb(ll i, ll pos, ll vel, char dir, ll len) { if (i == pos && dir == 'L') return '!'; if (i == pos + len-1 && dir == 'R') return '!'; if (pos <= i && i <= pos + len - 1) return '#'; return '='; } void solve() { int n,m, t; cin >> n >> m >> t; for (int i = 0; i > pos >> vel >> dir >> len; if (dir == 'L') vel *= -1; pos += t * vel; for (int j = 0; j < n; j++) { cout << get_symb(j, pos, vel, dir, len); } cout << "\n"; } } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); solve(); }