Pascal studies microorganisms and found a bacterium with an unusual growth pattern. If x of them are present at one moment, then in an ideal environment there are xx of them one hour later.
Given three integers A, B and C, compute how many bacteria there are B hours after a colony of A bacteria starts. Every hour the count x turns into xx, and that change happens B times. The answer grows very large, so print its remainder modulo C.