eolymp
bolt
Try our new interface for solving problems
Problems

Giant numbers

Giant numbers

After the mathematician Vasily calculated the ending digits of 99, he wanted to make a research on what numbers generally end the numbers of the form nn. Help him!

Input

Two numbers: n (1n108) and k (1k8) - the number of digits that Vasily needs.

Output

Print k last digits in one line (if any exist).

Time limit 1 second
Memory limit 128 MiB
Input example #1
3 3
Output example #1
27
Input example #2
14 3
Output example #2
016