You're given two numbers $$$n$$$ and $$$m$$$, Your task is to calculate $$$n × 245^m$$$ and then print the least significant digit of it.
The first line contains single integer $$$t$$$ the number of tests.
$$$1 \le t \le 10^3$$$.
Each test contains two numbers, $$$n$$$ and $$$m$$$ respectively.
$$$0 \le n, m \le 10^9$$$.
31 12 12 2
5 0 0
For each test, print one integer in one line — the answer to the problem.