Consider an odd prime $p$. For each $i$ in the set \( \{1, 2, \ldots, p-1\} \), let \( r_i \) be the remainder of \( i^p \) when it is divided by \( p^2 \). Find the sum:
\[
r_1 + r_2 + \ldots + r_{p-1}
\]

Let's think step by step and output the final answer within \boxed{}.
user