#! /usr/bin/env python import sys def main(): k=3L j=0 n=1111111111111111111111L while (j<100000): k = (k*k + 5) % n print(k) j=j+1 main()