#include<iostream>
#include<cstdio>
#define cf(x) ((x)&1?P-1:1)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define ROF(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
const int N=110,M=10010;
int n,m,K,P,T,nv,p[M],q[M],r[M],v[M],f[N][N],c[N][N],g[N][N];
void chk(int&x){x-=P;x+=(x>>31)&P;}
int qpw(int x,int y){int z=1;for(;y;y>>=1,x=1ll*x*x%P)if(y&1) z=1ll*z*x%P;return z;}
void work(int x){
	p[0]=q[0]=r[0]=v[0]=1;nv=qpw(K-x+1,P-2);
	FOR(i,1,T) p[i]=1ll*p[i-1]*x%P,q[i]=1ll*q[i-1]*(x-1)%P;
	FOR(i,1,T) r[i]=1ll*r[i-1]*(K-x+1)%P,v[i]=1ll*v[i-1]*nv%P;
	FOR(i,0,n)FOR(j,0,n) g[i][j]=1ll*q[i*j]*cf(j)%P;
	FOR(i,0,n)FOR(j,0,m) f[i][j]=1ll*f[i][j]*r[(n-i)*(m-j)]%P;
	ROF(i,n,0)ROF(j,m,0)FOR(k,0,i-1) chk(f[i][j]+=1ll*f[k][j]*c[n-k][i-k]%P*p[j*(i-k)]%P);
	ROF(i,n,0)ROF(j,m,0)FOR(k,0,j-1) chk(f[i][j]+=1ll*f[i][k]*c[m-k][j-k]%P*p[i*(j-k)]%P);
	//FOR(i,0,n)FOR(j,0,m) cout<<f[i][j]<<" \n"[j==m];
	ROF(i,n,0)ROF(j,m,0)FOR(k,0,i-1) chk(f[i][j]+=1ll*f[k][j]*c[n-k][i-k]%P*g[j][i-k]%P);
	ROF(i,n,0)ROF(j,m,0)FOR(k,0,j-1) chk(f[i][j]+=1ll*f[i][k]*c[m-k][j-k]%P*g[i][j-k]%P);
	FOR(i,0,n)FOR(j,0,m) f[i][j]=1ll*f[i][j]*v[(n-i)*(m-j)]%P;
	//FOR(i,0,n)FOR(j,0,m) cout<<f[i][j]<<" \n"[j==m];
}
int main(){
	//freopen("1.in","r",stdin);
	scanf("%d%d%d%d",&n,&m,&K,&P);
	if(n<m) swap(n,m);T=n*m;
	FOR(i,0,n) c[i][0]=1;
	FOR(i,1,n)FOR(j,1,i) c[i][j]=(c[i-1][j-1]+c[i-1][j])%P;
	f[0][0]=1;
	FOR(i,1,K) work(K-i+1);
	cout<<f[n][m]<<'\n';
}