Min-Max Distance Game

Starting from the given first player, both sides alternately remove one stone until two remain, with Alice maximizing and Bob minimizing the final distance.

Hard8Game theoryGreedySortingNo attempts yetTime limit1sMemory limit256 MB

Problem

Alice and Bob play the following game. At the start, n stones lie on one straight line on a table. The players take turns, and on a turn the player picks one of the remaining stones and removes it. The game ends when two stones are left on the line, and those two are called the result stones. Alice wants the result stones to end up as far apart as possible, and Bob wants them as close together as possible.

You are given the coordinates of the stones and the name of the player who takes the first turn. Both players play as well as they can. Compute the distance between the result stones at the end of the game.

Input

The input is a single test case in the following format.

n f
x1 x2 ... xn

n is the number of stones, with 3n1053 \le n \le 10^5. f is the name of the first player, either Alice or Bob. For each i, xix_i is an integer that gives the distance of the i-th stone from the edge of the table, and 0x1<x2<<xn1090 \le x_1 < x_2 < \dots < x_n \le 10^9 holds.

Output

Print the distance between the result stones on one line.