Calculation
题号:NC17387
时间限制:C/C++/Rust/Pascal 8秒,其他语言16秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

You are given an array A with N nodes. The array nodes are numbered from 0 to N-1 (represented by ai).
Firstly, AA defined a new array B. The i-th (0 ≤ i < N) node of B is bi.
                            
Please calculate array B.

输入描述:

The first line of the input is T(1≤ T ≤ 5), which stands for the number of test cases you need to solve.
In each test case, the first line contains three integers N, p and q (1 ≤ N ≤ 100000, 1 ≤ p,q ≤ 10), as mentioned above.
The next line contains N integers of array A. (0 ≤ ai ≤ 1000)

输出描述:

For each test case, output N integers of array B.
示例1

输入

复制
2
5 1 1
1 2 3 4 5
3 1 2
1 1 1

输出

复制
129 3711 38153 163078 120839
13 43 343