Given the values of n and p. Find n^n mod p.
Два целых числа n и p (1 ≤ n ≤ 10^9, 1 ≤ p ≤ 100).
Вывести одно целое число n^n mod 10^p.