A. A Water Problem
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

Alice the shark loves water. In fact, she can't live without water.

Alice has $$$n$$$ fish tanks. For $$$i=1,2,3, \dots, n$$$, the $$$i$$$-th fish tank has $$$a_i$$$ liters of water in it, where $$$a_i$$$ is a positive integer. Each fish tank has a "potential value": if it contains $$$x$$$ liters of water, then its potential $$$\mathcal{P}(x)$$$ is defined as $$$\mathcal{P}(x) = x \times \mathcal{D}(x)$$$, where $$$\mathcal{D}(x)$$$ is the sum of all digits in $$$x$$$. For example, $$$\mathcal{P}(123) = 123 \times (1 + 2 + 3) = 738$$$, and $$$\mathcal{P}(20000) = 20000 \times (2 + 0 + 0 + 0 + 0) = 40000$$$.

Please help Alice calculate the potential values of all her fish tanks.

Input

The first line contains an integer $$$n$$$. The second line contains $$$n$$$ space-separated integers $$$a_1, a_2, \dots, a_n$$$.

Technical specification:

  • $$$1 \le n \le 10^3$$$
  • $$$1 \le a_i \le 10^9$$$, for $$$i=1,2,\dots,n$$$
Output

Print $$$n$$$ lines. The $$$i$$$-th line should contain the potential of the $$$i$$$-th fish tank.

Example
Input
4
123 20000 5 998244353
Output
738
40000
25
46917484591