For each of the K^{NM} ways to write an integer between 1 and K (inclusive) in every square in a square grid with N rows and M columns, find the value defined below, then compute the sum of all those K^{NM} values, modulo D.

* For each of the NM squares, find the minimum among the N+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 NM values.

Constraints

* 1 \leq N,M,K \leq 100
* 10^8 \leq D \leq 10^9
* N,M,K, and D are integers.
* D is prime.

Input

Input is given from Standard Input in the following format:


N M K D


Output

Print the sum of the K^{NM} values, modulo D.

Examples

Input

2 2 2 998244353


Output

35


Input

2 3 4 998244353


Output

127090


Input

31 41 59 998244353


Output

827794103
#include<bits/stdc++.h>
using namespace std;

const int N=120;
typedef long long ll;

int dp[2][N][N],f[N][N],n,m,K,pw[N][N],C[N][N],mod,T;

int main(){
	cin>>n>>m>>K>>mod;
	for(int i=0;i<N;++i){
		pw[i][0]=1;C[i][0]=1;
		for(int j=1;j<N;++j)pw[i][j]=(ll)pw[i][j-1]*i%mod;
		for(int j=1;j<=i;++j)C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
	}
	dp[0][0][0]=1;
	for(int t=1;t<=K;++t){
		T^=1;memset(dp[T],0,sizeof dp[T]);memset(f,0,sizeof f);
		for(int i=0;i<=n;++i)
			for(int j=0;j<=m;++j)if(dp[!T][i][j]){
				int p=dp[!T][i][j],tmp=(ll)pw[K+1-t][j]*(pw[t][m-j]-pw[t-1][m-j]+mod)%mod;
				for(int k=0;k<=n-i;++k){
					f[i+k][j]=(f[i+k][j]+(ll)p*C[n-i][k])%mod;
					p=(ll)p*tmp%mod;
				}
			}
		for(int i=0;i<=n;++i)
			for(int j=0;j<=m;++j)if(f[i][j]){
				int p=f[i][j],tmp=(ll)pw[t][n-i]*(pw[K+1-t][i]-pw[K-t][i]+mod)%mod;
				for(int k=0;k<=m-j;++k){
					dp[T][i][j+k]=(dp[T][i][j+k]+(ll)p*C[m-j][k])%mod;
					p=(ll)p*tmp%mod;
				}
			}
	}
	cout<<dp[T][n][m]<<endl;
	return 0;
}

