The last 3 digits repeat periodically, we have to find the period.
First of all, let me please write the code to have a certain answer, the human solution follows:
Sage code:
L = []
R = Zmod(1000)
b = R(2012)
a = b
n = 1 # corresponds to a = b^1
while a not in L:
L.append(a)
print "2012^%3s = %3s modulo 1000" % ( n, a )
n += 1
a *= R(2012)
print "n = %s :: Value repeated = %s" % ( n, a )
Results (omissions in the middle...)
2012^ 1 = 12 modulo 1000
2012^ 2 = 144 modulo 1000
2012^ 3 = 728 modulo 1000
2012^ 4 = 736 modulo 1000
2012^ 5 = 832 modulo 1000
2012^ 6 = 984 modulo 1000
2012^ 7 = 808 modulo 1000
2012^ 8 = 696 modulo 1000
2012^ 9 = 352 modulo 1000
2012^ 10 = 224 modulo 1000
2012^ 11 = 688 modulo 1000
::::::::::::::::::::::::::
2012^ 95 = 968 modulo 1000
2012^ 96 = 616 modulo 1000
2012^ 97 = 392 modulo 1000
2012^ 98 = 704 modulo 1000
2012^ 99 = 448 modulo 1000
2012^100 = 376 modulo 1000
2012^101 = 512 modulo 1000
n = 102 :: Value repeated = 144
Now the human solution.
We want $2012^m = 2012^n$ modulo $1000$ with minimal values for $m>n>0$.
The equality modulo $1000$ is equivalent to the following two equalities:
$$
\begin{aligned}
2012^m &= 2012^n\text { modulo }2^3 = 8\ ,\qquad\text{ and }\\
2012^m &= 2012^n\text { modulo }5^3 = 125\ .
\end{aligned}
$$
For $n=1$ we have $2012^n=2012=4$ modulo $8$. For
$n>1$ we have of course $2012^n=4^n=0$ modulo $8$. So the first time we can have a repetition is for $n=2$. The repetition occurs - looking now on the side with rests modulo $125$, latest after
$$
\phi(125)=\phi(5^3)=\frac 45\cdot 5^3=100
$$
steps. (Since $2012$ is prime to $125$, here $\phi$ is the Euler indicator function.)
From the above computation we know that $100$ is the minimal period. To show this, it is enough to see that
$2012^{100/2}$, and
$2012^{100/5}$,
is not one modulo $125$. One can compute for instance
sage: 2012^10 % 125
99
sage: 2012^20 % 125, 99^2 % 125
(51, 51)
sage: 2012^50 % 125, 99^5 % 125
(124, 124)
So the order of $2012=12$ in the multiplicative group $(\Bbb Z/125)^\times$ of order $\phi(125)=100$ is indeed $100$, the full possible order, since no immediate divisors are. We can also ask
sage: R = Zmod(125)
sage: R(2012).multiplicative_order()
100
So the minimal values are $m=102 >n=2>0$.