$123^{561}$ Find the last $2$ digits
Can't I work this out using modular exponentiation working mod $100$?
$123^2 = 29\pmod{100}$
$123^4 = (123^2)^2 = 41\pmod{100}$
$123^8 = (123^4)^2 = 81\pmod{100}$
$123^{16} = (123^8)^2 = 61\pmod{100}$
$123^{32} = (123^16)^2 = 21\pmod{100}$
$123^{64} = (123^32)^2 = 41\pmod{100}$
$123^{128} = (123^64)^2 = 81\pmod{100}$
$123^{256} = (123^128)^2 = 61\pmod{100}$
$123^{512} = (123^256)^2 = 21\pmod{100}$
Then $561 = 512 \cdot 32 \cdot 16 \cdot 1$
so $21 \cdot 21 \cdot 61 \cdot 29 = 29\pmod{100}$
The answer is meant to be $21$!
What am I doing wrong? Do I have to use Eulers?