#arc113b. [arc113_b]A^B^C

[arc113_b]A^B^C

Problem Statement

Given positive integers A,B,CA, B, C, find the digit at the ones place in the decimal notation of ABCA^{B^C}.

Constraints

  • 1leqA,B,Cleq1091\\leq A,B,C \\leq 10^9
  • A,B,CA,B,C are integers.

Input

Input is given from Standard Input in the following format:

AA BB CC

Output

Print the digit at the one's place in the decimal notation of ABCA^{B^C}.


Sample Input 1

4 3 2

Sample Output 1

4

The ones digit in the decimal notation of 432=49=2621444^{3^2}=4^9=262144 is 44.


Sample Input 2

1 2 3

Sample Output 2

1

Sample Input 3

3141592 6535897 9323846

Sample Output 3

2