Statement : Grid Path
You are given a grid with
You may make any number of moves (possibly zero). The path of the chip is the set of cells it visits at least once (the order of visits does not matter).
Your task is to count the number of possible paths. Output the answer modulo
One line with three integers
One integer — the number of possible paths modulo
Input
2 2 100
Output
7
Input
1 5 777
Output
5
Input
5 3 998244353
Output
1695
Input
100000000 150 1000000000
Output
89058885