ADAHACK  Ada and Diary
Ada the Ladybug's crush Bumblebee Blazewan has a secret diary. Ada wants to read it to see, whether he loves her too. Sadly, the diary is locked with some very strong cipher so she can't read it.
She asked you for help. Unfortunately, you are not able to break through. Yet you observed, that the key generated in the cipher is generated in following way X_{i+1}=(aX_{i}+b) mod (10^{11}+3). You was able to find out first six X_{i}'s. Predicting next will help you to get through  can you do it?
Input
There will be no more than 10^{5} testcases.
Each testcase consists of line containing 6 integers 0 ≤ X_{i} < 10^{11}+3 (1 ≤ i ≤ 6)
Output
For each testcase print X_{7} (modulo 100000000003).
Example Input
2 10 34 106 322 970 2 4 4 4 4 4 2 11 47 191 767 3071 0 0 0 0 0 0 2 8 32 128 512 2048
Example Output
2914 4 12287 0 8192
Possible setting
a=3, b=4, X_{1}=2 a=0, b=4, X_{1}=2 a=4, b=3, X_{1}=2 a=2, b=0, X_{1}=0 a=4, b=0, X_{1}=2
hide comments
:D:
20181024 12:13:48
Time limit is per test file (there can be multiple). Results page shows the sum of execution times over all tests file. When program is being run you can sometimes see a description "running (A)" meaning test file number A is being tested at that moment. Last edit: 20181024 12:15:44 

matusjuran:
20180923 11:27:47
@morass If I may ask, why did my solutions get accepted despite the fact that all of them exceeded the 3s limit? 

morass:
20170826 16:52:18
@amit_ranjan: Well, there are "many" options for such input so you can choose any (for example any "a" and "b==0" shall be correct). Anyway it doesn't matter, since we don't have to find a/b for the answer.


amit_ranjan:
20170826 15:59:27
@morass how can i find a and b for values like 0 0 0.... Last edit: 20170826 15:59:50 

morass:
20170822 00:57:35
@KUNDAN KUMAR: Good day to you,


KUNDAN KUMAR:
20170821 12:42:48
I am getting Wrong Answer. Can anyone help me about this?


sanjay5797:
20170704 15:47:36
I'm getting runtime error even passed the sample test cases......


jayharsh:
20170527 07:16:06
please tell me how do we get the test cases ? 

morass:
20170527 00:08:09
@jai1998: Hello, depends on language you are using. For example in C/C++, you can use "while(~scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f))" / "while(cin>>a>>b>>c>>d>>e>>f)"


jai1998:
20170526 17:42:38
How to get number of test cases ? 
Added by:  Morass 
Date:  20170210 
Time limit:  3s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 