Dstorv

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

In a straight line, there is hand objects and flower objects moving in consistent speed. All hand objects move toward the left, and all flower objects move toward the right. The total number of objects are NN.

As the speed is consistent, no object of same type will collide to each other. However, there is a chance that the flower and hand might collide. In such case, one of them disappears, and other continues to move in the same direction in speed. 

Which one to be removed, is determined by a probability. Flower object disappears with probability rr+h\frac{r}{r+h}. Hand object disappears with probability hr+h\frac{h}{r+h}. r,hr, h are the integers given as an input.

After a sufficient amount of time, there will be no collision, as hands would've all gone left, and flowers would've all gone right. Your task is to calculate the probability that there is exactly AA flower object and BB hand object remaining after all the collision.

입력

The first line of the input contains three integers N,r,hN, r, h. (1N5,000,0r,h1,000,000,1r+h1 \le N \le 5\\,000, 0 \le r, h \le 1\\,000\\,000, 1 \le r + h)

The next line contains a string of length NN consisting of two character R, H. This denotes the initial placement of objects in left-to-right order. If a character is R, it denotes a flower object. If a character is H, it denotes a hand object. 

The last line contains two integers A,BA, B. (0A,BN,1A+BN0 \le A, B \le N, 1 \le A + B \le N)

출력

It can be shown that the answer can be represented as PQ\frac{P}{Q}, where P,QP, Q are coprime integer and Q0Q \neq 0 (mod109+7)(\mod 10^9 + 7)

Output the value of P×Q1P \times Q^{-1} mod 109+710^9 + 7.

힌트

The answer for the sample is 14\frac{1}{4}.