There are N soldiers on a straight numbered line. The soldiers have conveniently numbered 1 through N . The coordinate of the initial position of a soldier i is xi .
The soldiers will now do warmup on the numbered line, by performing sets described below.
- A set consists of M jumps. The j-th jump of a set is performed by soldier aj (2≤aj≤N−1). For this jump, either soldier aj−1 or soldier aj+1 is chosen with equal probability (let the chosen soldier be soldier x), then soldier aj will jump to the symmetric point of its current position with respect to soldier x.
The soldiers will perform K sets in succession. For each soldier, find the expected value of the coordinate of its eventual position after K sets are performed.
- xi is an integer.
The input is given from Standard Input in the following format:
x1 x2 . . . xN
a1 a2 . . . aM
Print N lines. The i-th line should contain the expected value of the coordinate of the eventual position of soldier i after K sets are performed. The output is considered correct if the absolute or relative error is at most 10−9.
Sample Testcase #0
-1 0 2
Sample Testcase #1
1 -1 1