Box Betting

No attempts yetTime limit1sMemory limit256 MB

Problem

A new delivery driver loads items onto a truck and drives off. He has to deliver at least LL items, and the truck carries at most UU items. A load larger than UU items breaks the truck down under the weight, and a load smaller than LL items fails the assignment.

At the loading dock there is a row of NN 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.

Input

The first line contains the number of test cases TT. Each test case consists of three lines. The first line contains the number of boxes NN. The second line contains a string of NN uppercase letters B1B2BNB_1 B_2 \dots B_N 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 LL and UU. LL is the number of items the driver has to deliver, and UU is the largest number of items the truck can take without breaking down.

  • 0<T1000 < T \le 100
  • 1<N2000001 < N \le 200000
  • Each BiB_i is an uppercase letter from A to Z
  • 0LU500000 \le L \le U \le 50000
  • The starting box is picked with uniform probability among the NN boxes, and the ending box is picked with uniform probability among the boxes from the starting box to the last box.

Output

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.