NASSA's robot landed on Mars. The landing site can be modeled as an infinite two-dimensional plane with perpendicular X and Y axes.
The robot keeps reporting its location back to Earth. Because of a serious design flaw it reports the moves it makes instead of the coordinates of its exact location, and some of the signals went missing before they reached the receiver.
During one exploration mission the robot sent a sequence of signals that can be written as a string over the characters U, R, D, L and ?. U is a step up (Y increases by 1), R is a step right (X increases by 1), D is a step down (Y decreases by 1), L is a step left (X decreases by 1), and ? is a missed signal. Every character of the string is a single step in the corresponding direction. A missed signal is a single step in one of the four directions. Before the robot starts sending the signals it is at X coordinate 0 and Y coordinate 0.
After sending some of the signals while moving, the robot's software crashed and it could not move any further. The researchers at the base want to narrow down the area they have to search. In other words, they want the minimum possible X coordinate, the minimum possible Y coordinate, the maximum possible X coordinate and the maximum possible Y coordinate of the place where the robot stopped.
Each of the four values is computed on its own. A single final position does not have to attain all four at once.
The input contains several test cases. The first line holds one integer T, the number of test cases (1≤T≤100). Each of the next T lines holds one non-empty string of at most 100000 characters, and each character is U, R, D, L or ?. This string is the sequence of signals described above.
For each test case print one line with four integers separated by single spaces: the minimum possible X coordinate, the minimum possible Y coordinate, the maximum possible X coordinate and the maximum possible Y coordinate of the place where the robot stopped.