#agc039f. [agc039_f]Min Product Sum

[agc039_f]Min Product Sum

Problem Statement

For each of the KNMK^{NM} ways to write an integer between 11 and KK (inclusive) in every square in a square grid with NN rows and MM columns, find the value defined below, then compute the sum of all those KNMK^{NM} values, modulo DD.

  • For each of the NMNM squares, find the minimum among the N+M1N+M-1 integers written in the square's row or the square's column. The value defined for the grid is the product of all these NMNM values.

Constraints

  • 1leqN,M,Kleq1001 \\leq N,M,K \\leq 100
  • 108leqDleq10910^8 \\leq D \\leq 10^9
  • N,M,K,N,M,K, and DD are integers.
  • DD is prime.

Input

Input is given from Standard Input in the following format:

NN MM KK DD

Output

Print the sum of the KNMK^{NM} values, modulo DD.


Sample Input 1

2 2 2 998244353

Sample Output 1

35

We have 11 way to write integers such that the product of the NMNM values is 1616, 44 ways such that the product is 22, and 1111 ways such that the product is 11.


Sample Input 2

2 3 4 998244353

Sample Output 2

127090

Sample Input 3

31 41 59 998244353

Sample Output 3

827794103