Grasshoppers

아직 제출이 없습니다시간 제한15초메모리 제한512 MB

문제

While relaxing on a meadow you've noticed an incredible spectacle: a group of grasshoppers was jumping in a circle. You found the dance particularly beautiful, as you realized that their moves were not random, but followed a mathematical pattern.

There are mm points marked on the circle. These points are numbered from 11 to mm in the order they appear on the circle and divide the circle into arcs of equal length. There are grasshoppers in some of these points, possibly more than one grasshopper in the same point. The grasshoppers are numbered from 11 to nn. Each second grasshoppers jump to new locations according to the following rule: If at the beginning of the second the grasshoppers 1,2,,n1, 2, \ldots, n are standing in points A_1,A_2,,A_nA\_1, A\_2, \ldots, A\_n respectively, and OO is the center of the circle, then at the end of the second the grasshoppers will be standing at positions B_1,B_2,,B_nB\_1, B\_2, \ldots, B\_n, where B_kB\_k is the reflection of point A_kA\_k over the line OA_k+1OA\_{k+1} for k=1,2,,n1k = 1, 2, \ldots, n - 1, and B_nB\_n is the reflection of point A_nA\_n over the line OA_1OA\_1. The grasshoppers' numbers do not necessarily correspond to their order in the circle, and do not change during the dance.

You need to go back home now, but you are wondering what will happen later on. Given the initial arrangement of the grasshoppers, find their positions after tt seconds.

입력

The first line of input contains the number of test cases zz (1z1091 \leq z \leq 10^9). The descriptions of the test cases follow.

The first line of each test case contains three integers n,m,tn, m, t (1n100,0001 \leq n \leq 100\\,000, 3m1003 \leq m \leq 100, 1t1091 \leq t \leq 10^9): the number of grasshoppers, the number of arcs and the number of seconds. The second line contains nn integers denoting initial positions of the grasshoppers. The positions are integers between 11 and mm inclusive. The total number of grasshoppers in all test cases does not exceed 200,000200\\,000.

출력

For each test case, output positions of the grasshoppers after tt seconds, separated by spaces.