#include<cstdio>
#include<iostream>
#define RI int
#define CI const int&
using namespace std;
const int N=105;
int n,m,s,mod,ans,C[N][N],f[N][N][N][2],coef[N][N][N][2];
inline void inc(int& x,CI y)
{
	if ((x+=y)>=mod) x-=mod;
}
inline int sum(CI x,CI y)
{
	int t=x+y; return t>=mod?t-mod:t;
}
inline int sub(CI x,CI y)
{
	int t=x-y; return t<0?t+mod:t;
}
inline int quick_pow(int x,int p=mod-2,int mul=1)
{
	for (;p;p>>=1,x=1LL*x*x%mod) if (p&1) mul=1LL*mul*x%mod; return mul;
}
int main()
{
	RI i,j,k,l; scanf("%d%d%d%d",&n,&m,&s,&mod);
	for (C[0][0]=i=1;i<=max(n,m);++i) for (C[i][0]=j=1;j<=i;++j)
	C[i][j]=sum(C[i-1][j],C[i-1][j-1]);
	for (k=1;k<=s;++k) for (i=0;i<=m;++i)
	{
		int cur=1LL*quick_pow(s-k+1,i)*sub(quick_pow(k,m-i),quick_pow(k-1,m-i))%mod;
		for (coef[k][i][0][0]=j=1;j<=n;++j) coef[k][i][j][0]=1LL*coef[k][i][j-1][0]*cur%mod;
	}
	//for (k=1;k<=s;++k) for (i=0;i<=m;++i) for (j=0;j<=n;++j)
	//printf("%d ",coef[k][i][j][0]); putchar('\n');
	for (k=1;k<=s;++k) for (i=0;i<=n;++i)
	{
		int cur=1LL*quick_pow(k,n-i)*sub(quick_pow(s-k+1,i),quick_pow(s-k,i))%mod;
		for (coef[k][i][0][1]=j=1;j<=m;++j) coef[k][i][j][1]=1LL*coef[k][i][j-1][1]*cur%mod;
	}
	//for (k=1;k<=s;++k) for (i=0;i<=m;++i) for (j=0;j<=n;++j)
	//printf("%d ",coef[k][i][j][1]); putchar('\n');
	for (f[1][0][0][0]=k=1;k<=s;++k) for (i=0;i<=n;++i) for (j=0;j<=m;++j)
	{
		for (l=0;l<=n-i;++l)
		inc(f[k][i+l][j][1],1LL*f[k][i][j][0]*C[n-i][l]%mod*coef[k][j][l][0]%mod);
		for (l=0;l<=m-j;++l)
		inc(f[k+1][i][j+l][0],1LL*f[k][i][j][1]*C[m-j][l]%mod*coef[k][i][l][1]%mod);
	}
	return printf("%d",f[s+1][n][m][0]),0;
}