12. Decode the rebus $(\mathrm{AP})^{M}=$ МИР, if the same letters encode the same digits, and different letters encode different digits.
12. Since raising a two-digit number to a certain power resulted in a three-digit number, the exponent can only be 2. This means $\mathrm{M}=2$, then $\mathrm{A}=1$; P can be 5 or 6, but $15^{2}=225$ does not satisfy the condition, so $\mathrm{P}=6$. We have $16^{2}=256$.