A new delivery driver loads items onto a truck and drives off. He has to deliver at least L items, and the truck carries at most U items. A load larger than U items breaks the truck down under the weight, and a load smaller than L items fails the assignment.
At the loading dock there is a row of N boxes, and each box holds a fixed number of items. The driver is too shy to ask anyone for help, so he picks one starting box completely at random from the row. He then picks one ending box at random among the boxes from the starting box to the end of the row. Every box between the two picked boxes, including both of them, goes onto the truck.
The other employees bet on whether the truck breaks down, the driver takes too few items, or the driver gets lucky and finishes the assignment. Compute the probability of each of the three outcomes. Assume the boxes the driver picks always fit into the truck.
The first line contains the number of test cases T. Each test case consists of three lines. The first line contains the number of boxes N. The second line contains a string of N uppercase letters B1B2…BN with no whitespace, giving the number of items in each box in the order the boxes sit on the dock. A is an empty box, B is a box with 1 item, and in the same way Z is a box with 25 items. The third line contains two integers L and U. L is the number of items the driver has to deliver, and U is the largest number of items the truck can take without breaking down.
For each test case, print three numbers on one line, separated by single spaces. The first number is the probability that the driver finishes the assignment, the second is the probability that he takes too few items, and the third is the probability that the truck breaks down. Print all three values rounded to six digits after the decimal point.