ll M=1000000007,D=1<<27,x=0,A=0, T[]={1,638916270,864357307,711403642,373979365,963971145,183143523,894672548}; { char c; while(c=getchar(),'0'<=c&&c<='9'&&x