There is an grid in which there are rows and colums. A cell is defined as the row from the top and column from left. You are located at initially and can perform the following steps any number of times:
There are some obstacles in the path.
You are initially located at and wants to reach but you are interested in knowing the number of ways you can reach from . Since these numbers can huge, print it modulo .
Two ways are considered different if they have a different number of steps or differ in some positions.
Note
Input format
Output format
For each test case, print a single line denoting the number of ways to reach from modulo .
Constraints
Each cell consists of either . or *.
The grid consists of and .
There are 8 ways: