//minamoto
#include<bits/stdc++.h>
#define R register
#define int unsigned int
#define fp(i,a,b) for(R int i=(a),I=(b)+1;i<I;++i)
#define fd(i,a,b) for(R int i=(a),I=(b)-1;i>I;--i)
#define go(u) for(int i=head[u],v=e[i].v;i;i=e[i].nx,v=e[i].v)
template<class T>inline bool cmax(T&a,const T&b){return a<b?a=b,1:0;}
template<class T>inline bool cmin(T&a,const T&b){return a>b?a=b,1:0;}
using namespace std;
int P;
//inline void upd(R int &x,R int y){(x+=y)>=P?x-=P:0;}
//inline int add(R int x,R int y){return x+y>=P?x+y-P:x+y;}
//inline int add(R int x,R int y){return }
inline void upd(R int &x,R int y){x+=y,x-=P*((x>>30)&3);}
inline int add(R int x,R int y){return x+=y,x-=P*((x>>30)&3);}
inline int mul(R int x,R int y){return 1ull*x*y-1ull*x*y/P*P;}
int ksm(R int x,R int y){
    R int res=1;
    for(;y;y>>=1,x=mul(x,x))(y&1)?res=mul(res,x):0;
    return res;
}
const int N=105;
int f[N][N][N][2],coef[N][N][N][2],bn[N][N];
int n,m,L,ret,cp;
signed main(){
    scanf("%u%u%u%u",&n,&m,&L,&P);
    fp(i,0,max(n,m)){
        bn[i][0]=1;
        fp(j,1,i)bn[i][j]=add(bn[i-1][j],bn[i-1][j-1]);
    }
    fp(k,1,L)fp(i,0,m){
        cp=mul(ksm(L-k+1,i),add(ksm(k,m-i),P-ksm(k-1,m-i)));
        ret=1;
        fp(j,0,n)coef[k][i][j][0]=ret,ret=mul(ret,cp);
    }
    fp(k,1,L)fp(i,0,n){
        cp=mul(add(ksm(L-k+1,i),P-ksm(L-k,i)),ksm(k,n-i));
        ret=1;
        fp(j,0,m)coef[k][i][j][1]=ret,ret=mul(ret,cp);
    }
    f[1][0][0][0]=1;
    fp(k,1,L)fp(i,0,n)fp(j,0,m){
        ret=f[k][i][j][0];
        fp(l,0,n-i)upd(f[k][i+l][j][1],1ll*ret*bn[n-i][l]%P*coef[k][j][l][0]%P);
        ret=f[k][i][j][1];
        fp(l,0,m-j)upd(f[k+1][i][j+l][0],1ll*ret*bn[m-j][l]%P*coef[k][i][l][1]%P);
    }
    printf("%u\n",f[L+1][n][m][0]%P);
    return 0;
}