using namespace std;
#include <cstdio>
#include <cstring>
#include <algorithm>
#define N 110
#define ll long long
int n,m,K,mo;
ll pw[N][N*N],w[N][N][N],C[N][N];
ll f[N][N][N],g[N][N][N];
//transform --- f:go down g:go right
//f[k]->g[k] g[k]->f[k+1]
inline void add(ll &a,ll b){a=(a+b)%mo;}
int main(){
	scanf("%d%d%d%d",&n,&m,&K,&mo);
	for (int x=0;x<=K;++x){
		pw[x][0]=1;
		for (int i=1;i<=n*m;++i)
			pw[x][i]=pw[x][i-1]*x%mo;
	}
	for (int x=1;x<=K;++x)
		for (int i=0;i<=max(n,m);++i){
			ll p=(pw[x][i]-pw[x-1][i]+mo)%mo;
			w[x][i][0]=1;
			for (int j=1;j<=max(n,m);++j)
				w[x][i][j]=w[x][i][j-1]*p%mo;
		}
	for (int i=0;i<=max(n,m);++i){
		C[i][0]=1;
		for (int j=1;j<=i;++j)
			C[i][j]=(C[i-1][j-1]+C[i-1][j])%mo;
	}
	f[0][0][0]=1;
	for (int k=0;k<K;++k)
		for (int i=0;i<=n;++i)
			for (int j=0;j<=m;++j){
				if (f[k][i][j]){
					ll s=f[k][i][j];
					add(g[k][i][j],s);
					if (j<m)
						for (int t=1;i+t<=n;++t)
							add(g[k][i+t][j],s*w[k+1][m-j][t]%mo*pw[K-k][t*j]%mo*C[i+t][t]);
				}
				if (g[k][i][j]){
					ll s=g[k][i][j];
					add(f[k+1][i][j],s);
					if (i)
						for (int t=1;j+t<=m;++t)
							add(f[k+1][i][j+t],s*w[K-k][i][t]%mo*pw[k+1][t*(n-i)]%mo*C[j+t][t]);
				}
			}
	printf("%lld\n",f[K][n][m]);
	return 0;
}













