Rotate and Shift

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

문제

To celebrate the start of spring, Farmer John's NN cows (1N21051 \leq N \leq 2 \cdot 10^5) have invented an intriguing new dance, where they stand in a circle and re-order themselves in a predictable way.

Specifically, there are NN positions around the circle, numbered sequentially from 00 to N1N-1, with position 00 following position N1N-1. A cow resides at each position. The cows are also numbered sequentially from 00 to N1N-1. Initially, cow ii starts in position ii. You are told a set of KK positions 0=A_1\<A_2<<A_K\<N0=A\_1\<A\_2< \ldots< A\_K\<N that are "active", meaning the cows in these positions are the next to move (1KN1 \leq K \leq N).

In each minute of the dance, two things happen. First, the cows in the active positions rotate: the cow at position A_1A\_1 moves to position A_2A\_2, the cow at position A_2A\_2 moves to position A_3A\_3, and so on, with the cow at position A_KA\_K moving to position A_1A\_1. All of these KK moves happen simultaneously, so the after the rotation is complete, all of the active positions still contain exactly one cow. Next, the active positions themselves shift: A_1A\_1 becomes A_1+1A\_1+1, A_2A\_2 becomes A_2+1A\_2+1, and so on (if A_i=N1A\_i = N-1 for some active position, then A_iA\_i circles back around to 00).

Please calculate the order of the cows after TT minutes of the dance (1T1091\le T\le 10^9).

입력

The first line contains three integers NN, KK, and TT.

The second line contains KK integers representing the initial set of active positions A_1,A_2,A_KA\_1,A\_2, \ldots A\_K. Recall that A_1=0A\_1 = 0 and that these are given in increasing order.

출력

Output the order of the cows after TT minutes, starting with the cow in position 00, separated by spaces.