For given positive integers , and , your task is to print the last digits of the power .
Input
First line of input will be a single integer - the number of testcases.
Each of the next lines contains three integers , and .
Output
For every testcase print a single line with exactly characters - the last (rightmost) digits of , including leading zeros.
Example
Input
3 2 13 3 10 5 3 3452 20 4
Output
192 000 0576
, so its last three digits are . ends in three zeros - all three must be printed.
Constraints
This problem was adapted, with permission, from Poslednjih k cifara stepena, authored by Društvo matematičara Srbije and Fondacija Petlja.