Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

The problem statement has recently been changed. View the changes.

×
B. Testing Robots

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputThe Cybernetics Failures (CF) organisation made a prototype of a bomb technician robot. To find the possible problems it was decided to carry out a series of tests. At the beginning of each test the robot prototype will be placed in cell (*x*_{0}, *y*_{0}) of a rectangular squared field of size *x* × *y*, after that a mine will be installed into one of the squares of the field. It is supposed to conduct exactly *x*·*y* tests, each time a mine is installed into a square that has never been used before. The starting cell of the robot always remains the same.

After placing the objects on the field the robot will have to run a sequence of commands given by string *s*, consisting only of characters 'L', 'R', 'U', 'D'. These commands tell the robot to move one square to the left, to the right, up or down, or stay idle if moving in the given direction is impossible. As soon as the robot fulfills all the sequence of commands, it will blow up due to a bug in the code. But if at some moment of time the robot is at the same square with the mine, it will also blow up, but not due to a bug in the code.

Moving to the left decreases coordinate *y*, and moving to the right increases it. Similarly, moving up decreases the *x* coordinate, and moving down increases it.

The tests can go on for very long, so your task is to predict their results. For each *k* from 0 to *length*(*s*) your task is to find in how many tests the robot will run exactly *k* commands before it blows up.

Input

The first line of the input contains four integers *x*, *y*, *x*_{0}, *y*_{0} (1 ≤ *x*, *y* ≤ 500, 1 ≤ *x*_{0} ≤ *x*, 1 ≤ *y*_{0} ≤ *y*) — the sizes of the field and the starting coordinates of the robot. The coordinate axis *X* is directed downwards and axis *Y* is directed to the right.

The second line contains a sequence of commands *s*, which should be fulfilled by the robot. It has length from 1 to 100 000 characters and only consists of characters 'L', 'R', 'U', 'D'.

Output

Print the sequence consisting of (*length*(*s*) + 1) numbers. On the *k*-th position, starting with zero, print the number of tests where the robot will run exactly *k* commands before it blows up.

Examples

Input

3 4 2 2

UURDRDRL

Output

1 1 0 1 1 1 1 0 6

Input

2 2 2 2

ULD

Output

1 1 1 1

Note

In the first sample, if we exclude the probable impact of the mines, the robot's route will look like that: .

Codeforces (c) Copyright 2010-2022 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Aug/16/2022 16:12:04 (k2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|