Dynamic Frog#1599

Dynamic Frog

1 second
128 megabytes
Very easy

With the increased use of pesticides, the local streams and rivers have become so contaminated that it has become almost impossible for aquatic animals to survive.

Frog Fred is on the left bank of such a river. stones are arranged in a straight line from the left bank to the right bank. The distance between the left and right banks is meters. There are stones of two types. The big ones can withstand any weight, but the small ones start to sink as soon as any mass is placed on them. Fred must go to the right bank to collect a gift and then return to the left bank, where his home is located.

He can land on each small stone at most once, but can use the big ones as many times as he likes. He cannot touch the polluted water because it is extremely contaminated.

Can you plan the itinerary so that the maximum distance of a single leap is minimized?

Input

The first line contains the number of test cases (t < 100). Each test case starts with a line containing two integers (0 \le n \le 100) and (1 \le d \le 10^9). The next line describes the stones. Each stone is defined by . indicates the type of stone, Big () or Small (), and (0 < m < d) is the distance of that stone from the left bank. The stones are given in increasing order of .

Output

For each test case, print the case number followed by the minimal possible value of the largest jump.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading