I'm reading Fermat's Theorem (that $a^{p-1} \equiv 1 \pmod{p}$) proof (What is mathematics book) and they consider the multiples of a $m_1 = a, m_2 = 2a, m_3 = 3a, ..., m_{p-1} = (p-1)a$. They explain why no two of these numbers can be congruent modulo p. Also, I understand why these numbers aren't congruent to $0$ modulo p. Then they say that the numbers $m_1, m_2, ..., m_{p-1}$ must be respectively congruent to the numbers 1, 2, 3, ..., p-1.
I can't understand how they came to the last conclusion which is in bold. I will be grateful for any help you can provide.