1234^{1234} = 1234^{10 \cdot 123 + 4} = 1234^{10 \cdot 123} \cdot 1234^{4}