//icpc2012rC #include #include using namespace std; typedef valarrayV; int n=2,m=1000; V z; V &Me(const V &_x,const V &_y){ int i=0,j; for(;i>=1){ if(r&1)e=Me(e,x); x=Mx(x); } printf("%03d\n",(2*e[0]-1)%1000); } }