We all have much to be proud of.
As a player of the game Ingress, IloveMATH is proud of these portals on the road in front of his campus.
Here is a brief introduction of this mobile game. Ingress, as a sandbox game, connects the actual world around us with the virtual battleground.
Those strategic fortress points, we call portals, correspond to the real buildings, sculptures, statues and other objects that can easily be discoverd.
If you read the virtual map of the Ingress world, a neat row of portals along the road in front of Xtended Domain University (XDU) could catch your eye immediately.
The total length of the road is LLL metres, and there are NNN portals on the road.
The distance between the left side of the road and the iii-th portal is XiX_iXi, where 0≤Xi≤L0\le X_i\le L0≤Xi≤L and XiX_iXi is an integer.
The gate of XDU is situated on KKK, where KKK is an integr and 0≤K≤L0\le K\le L0≤K≤L as well.
To get more virtual supplies and properties in the game, IloveMATH should hack these portals.
Hacking a portal can get some items randomly such as missiles, shields and turrets.
However, hacking would heat the portal and the player could not hack it again until the portal finished the process of cooling.
Now IloveMATH stands at the left side of the road (located on 000).
He knows the end time of cooling for each portal.
His mission is to visit and hack each portal at least once and go back to the school gate.
The time consumption of moving from iii to jjj is ∣i−j∣|i-j|∣i−j∣ and the hacking is instantaneous (its time consumption is 000).
Help IloveMATH finish the mission as soon as possible. It's time to move.
Input Format
The input of this problem contains several test cases.
The first line of the input provides the total number of test cases.
Each test case is consists of N+1N+1N+1 lines and the first lines provides three integers N (N≤1000)N~(N\le 1000)N (N≤1000), L (L≤1000)L~(L\le 1000)L (L≤1000) and K (0≤K≤L)K~(0\le K\le L)K (0≤K≤L).
The following NNN lines correspond to NNN portals and the iii-th line contains the location of the portal, and its end time of cooling.
All input numbers should be small than 327683276832768.
Output Format
For each test case output the case number first. Then output the best time for completing the mission.
样例输入
1 4 10 3 8 9 4 21 3 16 8 12
样例输出
Case #1: 22