Little Petya likes rectangular tables filled with integers a lot. He is especially fond of special tables. He calls table special if and only if the following conditions are satisfied:
- The table has exactly N rows and M columns.
- Each cell of the table contains an integer between 1 and C, inclusive.
- For any pair of row indices r1 and r2 (r1 != r2) there exist a column index c such that the numbers at cells (r1, c) and (r2, c) are different.
- For any pair of column indices c1 and c2 (c1 != c2) there exist a row index r such that the numbers at cells (r, c1) and (r, c2) are different.
You are given the ints N, M, and C.
Count all special tables and return their count modulo 1,000,000,007.
|