C. Cockroach Racing
time limit per test
1.5 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

Julia organizes the largest cockroach race ever. It's a fun and exotic job where the main and the only problem is to place cockroaches in the correct order at the start. Once it's done, everything is cockroach gods will. It is known that, chalk written numbers on the cockroaches backs can have leading zeros, and most crucially, the numbers of cockroaches at the start must form an increasing sequence. It's not known who and why came up with this rule. Anyway, we just have to obey. But unfortunately chalk erases easily, so here and there only vague spots remained instead of some digits. Since Julia is a true professional and doesn't want to break the rule, she is trying to restore accidentally erased digits. Let's calculate the sum of all the possible numbers of cockroaches for all possible sequences.

Input

The first line contains two integers $$$n$$$ and $$$m$$$ — the ammount of cockroaches and the length of their numbers. Next $$$n$$$ lines contain numbers patterns. Each pattern is formed using digits '0' to '9' and/or '?' symbol.

$$$$$$1 \le n, m \le 50$$$$$$

Output

Output the sum of all the possible numbers of cockroaches for all the possible sequences modulo $$$10^9+7$$$.

Examples
Input
2 2
??
??
Output
490050
Input
2 3
4??
??2
Output
6403775
Input
4 1
0
?
4
8
Output
42