Mix and Merge

Limits 1s, 512 MB

You are given an array AA of nn elements and a constant kk. You can perform the following operation on the array —

Calculate the minimum cost to reduce the array to only one element, by performing the mentioned operation as many times needed.

Input

First line of input will contain an integer TT denoting the number of test cases.

For each test case, the first line contains two integers nn and kk, and the second line contains nn integers A1, A2,AnA_1, ~A_2, \dots A_n.

Constraints:

Output

For each test case, output a line in the format “Case i: x” without the quotes, where xx is the minimum cost to reduce the array to only one element, by performing the mentioned operation as many times needed.

Sample

InputOutput
1
4 3
1 2 3 4
Case 1: 13