#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define mp make_pair
#define PI pair<int,int>
#define poly vector<ll>
#define For(i,l,r) for(int i=(int)(l);i<=(int)(r);i++)
#define Rep(i,r,l) for(int i=(int)(r);i>=(int)(l);i--)
#define pb push_back
#define fi first
#define se second
inline char gc(){
    static char buf[100000],*p1=buf,*p2=buf;
    return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
}
#define gc getchar
inline ll read(){
	ll x = 0; char ch = gc(); bool positive = 1;
	for (; !isdigit(ch); ch = gc())	if (ch == '-')	positive = 0;
	for (; isdigit(ch); ch = gc())	x = x * 10 + ch - '0';
	return positive ? x : -x;
}
inline void write(ll a){
    if(a<0){
    	a=-a; putchar('-');
	}
    if(a>=10)write(a/10);
    putchar('0'+a%10);
}
inline void writeln(ll a){write(a); puts("");}
inline void wri(ll a){write(a); putchar(' ');}
inline ull rnd(){
	return ((ull)rand()<<30^rand())<<4|rand()%4;
}
const int N=105;
ll f[N][N][N],g[N][N][N],mod2;
int c[N][N],ycf[N][N][N],ycg[N][N][N],mod;
ll ksm(ll a,int b){
	int ans=1;
	for(;b;b>>=1){
		if(b&1)ans=ans*a%mod;
		a=a*a%mod;
	}
	return ans;
}
int main(){
	int n=read(),m=read(),K=read(); mod=read(); mod2=(ll)mod*mod*7;
	For(i,1,K)For(k,0,m){
		ll xs=(ksm(i,m-k)-ksm(i-1,m-k)+mod)*ksm(K-i+1,k)%mod; 
		For(l,ycf[i][k][0]=1,n)ycf[i][k][l]=ycf[i][k][l-1]*xs%mod;
	}
	For(i,1,K)For(j,0,n){
		ll xs=(ksm(K-i+1,j)-ksm(K-i,j)+mod)*ksm(i,n-j)%mod;
		For(l,ycg[i][j][0]=1,m)ycg[i][j][l]=ycg[i][j][l-1]*xs%mod;
	}
	For(i,0,max(n,m))For(j,c[i][0]=1,i)c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod;
	f[1][0][0]=1;
	For(i,1,K){
		For(j,0,n)For(k,0,m){
			f[i][j][k]%=mod; g[i][j][k]%=mod;
			For(l,0,n-j){
				g[i][j+l][k]+=f[i][j][k]*c[n-j][l]%mod*ycf[i][k][l];
				if(g[i][j+l][k]>=mod2)g[i][j+l][k]-=mod2;
			}
			For(l,0,m-k){
				f[i+1][j][k+l]+=g[i][j][k]*c[m-k][l]%mod*ycg[i][j][l];
				if(f[i+1][j][k+l]>=mod2)f[i+1][j][k+l]-=mod2;
			}
		}
	}
	cout<<f[K+1][n][m]%mod<<endl;
}