#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int n,m,K,mod;
inline int add(int a,int b){a+=b;return a>=mod?a-mod:a;}
inline int sub(int a,int b){a-=b;return a<0?a+mod:a;}
inline int mul(int a,int b){return 1ll*a*b%mod;}
inline int qpow(int a,int b){int ret=1;for(;b;b>>=1,a=mul(a,a))if(b&1)ret=mul(ret,a);return ret;}
/* math */
const int N = 110;
int bin[N][N];
int c=0,f[2][N][N],cst[N][N];
int fac[N], ifac[N], pw[N][N*N];
int main()
{
	cin >> n >> m >> K >> mod;
	for(int i=0;i<=K;i++){
		pw[i][0]=1;for(int j=1;j<=n*m;j++)pw[i][j]=mul(pw[i][j-1],i);
	}
	fac[0]=ifac[0]=1;for(int i=1;i<=max(n,m);i++)fac[i] = mul(fac[i-1],i);
	ifac[max(n,m)]=qpow(fac[max(n,m)],mod-2);for(int j=max(n,m)-1;j;j--)ifac[j]=mul(ifac[j+1],j+1);
	f[c][0][0]=1;
	for(int D = 1;D<=K;D++){
		c^=1;memset(f[c],0,sizeof(f[c]));
		for(int j=0;j<=n;j++)
		for(int k=0;k<=m;k++){
			cst[j][k] = mul(mul(ifac[j],pw[D-1][j*(m-k)]), mul(pw[K-D+1][j*k], j%2?mod-1:1));
		}
		for(int i=0;i<=n;i++)for(int j=0;j<=m;j++){
			for(int k=0;k<=i;k++){
				f[c][i][j]=add(f[c][i][j], mul(f[c^1][i-k][j], cst[k][j]));
			}
		}
		// cout << f[c][0][0] << " " << f[c][0][1] << " " << f[c][1][0] << " " << f[c][1][1] << endl;
		c^=1;memset(f[c],0,sizeof(f[c]));
		for(int j=0;j<=m;j++)
		for(int k=0;k<=n;k++){
			cst[j][k] = mul(mul(ifac[j],pw[D-1][j*(n-k)]), mul(pw[K-D+1][j*k], j%2?mod-1:1));
		}
		for(int i=0;i<=n;i++)for(int j=0;j<=m;j++){
			for(int k=0;k<=j;k++){
				f[c][i][j]=add(f[c][i][j], mul(f[c^1][i][j-k], cst[k][i]));
			}
		}
		// cout << f[c][0][0] << " " << f[c][0][1] << " " << f[c][1][0] << " " << f[c][1][1] << endl;
		c^=1;memset(f[c],0,sizeof(f[c]));
		for(int j=0;j<=n;j++)
		for(int k=0;k<=m;k++){
			cst[j][k] = mul(mul(ifac[j],pw[D][j*(m-k)]), mul(pw[K-D+1][j*k], 1));
		}
		for(int i=0;i<=n;i++)for(int j=0;j<=m;j++){
			for(int k=0;k<=i;k++){
				f[c][i][j]=add(f[c][i][j], mul(f[c^1][i-k][j], cst[k][j]));
			}
		}
		
		//  cout << f[c][0][0] << " " << f[c][0][1] << " " << f[c][1][0] << " " << f[c][1][1] << endl;
		c^=1;memset(f[c],0,sizeof(f[c]));
		for(int j=0;j<=m;j++)
		for(int k=0;k<=n;k++){
			cst[j][k] = mul(mul(ifac[j],pw[D][j*(n-k)]), mul(pw[K-D+1][j*k], 1));
		}
		for(int i=0;i<=n;i++)for(int j=0;j<=m;j++){
			for(int k=0;k<=j;k++){
				f[c][i][j]=add(f[c][i][j], mul(f[c^1][i][j-k], cst[k][i]));
			}
		}
		
		//  cout << f[c][0][0] << " " << f[c][0][1] << " " << f[c][1][0] << " " << f[c][1][1] << endl;
	}
	cout << mul(f[c][n][m], mul(fac[n],fac[m])) << endl;
}