in reply to The Exponentiation of (not-so) Large Primes

Just make use of the fact that:
(a * b) % c = ((a % c) * (b % c)) %c

So,

(1019 ** 1019) % 3337 = ((1019 ** 2) * (1019 ** 1017)) % 3337 = (((1019 ** 2) % 3337) * (1019 ** 1017) % 3337)) % 3337

which shouldn't be too hard to continue.

Abigail