Given an n×m integer matrix A, a local maximum of A is a location (i,j) (1≤i≤n and 1≤j≤m) such that A_i,j is no smaller than any other integer on the i-th row or on the j-th column.
For example, in the 3×3 matrix 2 2 2512462, there are three local maxima: locations (1,2), (2,3), and (3,1) with values 5, 6, and 2, repectively.
An n×m integer matrix A is good if and only if it satisfies the following two conditions:
Given n, m, and a prime number P, your task is to count the number of good matrices of size n×m modulo P.
The first line contains three integers, n, m, and P, where 1≤n,m≤3000 and 108≤P≤109+7. It is guaranteed that P is prime.
Output a single line with a single integer: the number of good matrices modulo P.