I'm trying to apply the square and multiply algorithm and I'm getting strange results even though I'm pretty sure I've done everything right. I'm trying to calculate $5^{25} \mod 193$:
Binary representation of 25: 11001
\begin{equation} \begin{split} 5^2 = 25 \\ 25*5 = 125 \\ 125^2 = 185 \\ 185*5 = 153 \\ 152^2 = 56 \\ 56^2 = 48 \\ 48^2 = 181 \\ 181*5 = 133 \end{split} \end{equation}
But when I check my answer on wolframalpha it tells me the correct solution should be 22. I checked every single step twice. What did I miss?