Sleeping at Work

No attempts yetTime limit1sMemory limit256 MB

Problem

You are at work, and a programming contest starts right after your working hours end. To do well you have to sleep at work and recover as much energy as possible.

Your workday is NN minutes long. Minute ii has energy value eie_i for every ii with 0i<N0 \le i < N. You have to sleep for exactly MM minutes. Your boss notices if you sleep more than RR minutes in a row, so every run of consecutive sleeping minutes has length at most RR. Two different runs have at least one waking minute between them. Two runs that touch are one longer run.

Sleeping several minutes in a row gives a bonus. The kk-th minute of a run has its energy value multiplied by kk. For instance, sleeping three minutes in a row whose energy values are 10,10,910, 10, 9 gains 10+2×10+3×9=5710 + 2 \times 10 + 3 \times 9 = 57 energy.

Once you have slept MM minutes you are fully rested and cannot sleep any more that day. You can start and stop sleeping only when the minute indicator on the clock changes.

Write a program that computes the largest amount of energy you can gain during the workday.

Input

The first line contains an integer TT, the number of test cases.

The first line of each test case contains three integers separated by spaces: the workday length NN, the required sleep MM, and the largest number of minutes RR you can sleep in a row. The second line contains the NN integers e0,e1,,eN1e_0, e_1, \dots, e_{N-1} separated by spaces.

  • 0<T1000 < T \le 100
  • 0<N5000 < N \le 500
  • 0<M500 < M \le 50
  • 0<R500 < R \le 50
  • 0ei1000 \le e_i \le 100

Output

For each test case print one line with the largest amount of energy that can be gained by sleeping exactly MM minutes. If sleeping MM minutes is impossible, print impossible.