You want to stimulate shooting route in a room. You know the boundary of room, the start point of a shooting object, and the direction of shooting. When the object hitting the boundary, it would reflect with 45 degrees. Your mission is to show the route of the shooting object.
The first line has three numbers, C, F and H, which respectively means the length of the ceiling, the length of the floor, and the height between the ceilings and floors.
The second line has a number S, which means the start point of shooting object. It's noted that the location below the ceiling is 1, and the location below that is 2, and so on.
The third line has a character 'u' or 'd'. It corresponds to the initial direction of shooting.
There are only one case for each testcase
Draw the map and the route of the shooting object.
The route of shooting object is marked as '*', which appears until the object is out of boundaries.
You need to use a (H+2)*(max{C, F, the horizontal length of the route of shooting}) array to print out the result
Remember there is '\n' in the end.