SP30691 ADAHACK - Ada and Diary
Description
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 Format
There will be no more than **10 $ ^{5} $** test-cases.
Each test-case consists of line containing 6 integers **0 (**1 )****
Output Format
For each test-case print **X $ _{7} $** (modulo 100000000003).