
#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;
const int Max_K(105);
const int Max_NM(105);

int N, M, K, MOD, Fac[Max_NM], Inv[Max_NM], F[Max_NM][Max_NM], G[2][Max_NM][Max_NM], power[Max_K][Max_NM * Max_NM];

inline int Add(int a, int b)
{
	return a + b >= MOD ? a + b - MOD : a + b;
}

inline int Sub(int a, int b)
{
	return a - b < 0 ? a - b + MOD : a - b;
}

inline int Mult(int a, int b)
{
	return a * 1LL * b % MOD;
}

inline void upd(int &a, int b)
{
	a = Add(a, b);
}

inline void inc(int &a, int b)
{
	a = Sub(a, b);
}

void exgcd(int a, int b, int &x, int &y)
{
	if (b == 0)
		x = 1, y = 0;
	else
		exgcd(b, a % b, y, x), y -= x * (a / b);
}

inline int inverse(int a)
{
	int invx, invy;
	exgcd(a, MOD, invx, invy);
	return (invx % MOD + MOD) % MOD;
}

int main()
{
	scanf("%d%d%d%d", &N, &M, &K, &MOD);
	Fac[0] = 1;
	for (int i = 1;i <= max(N, M);++i)
		Fac[i] = Mult(Fac[i - 1], i);
	Inv[max(N, M)] = inverse(Fac[max(N, M)]);
	for (int i = max(N, M) - 1;i >= 0;--i)
		Inv[i] = Mult(Inv[i + 1], i + 1);
	for (int d = 1;d <= K;++d)
	{
		power[d][0] = 1;
		for (int i = 1;i <= N * M;++i)
			power[d][i] = Mult(power[d][i - 1], d);
	} 
	F[0][0] = 1;
	for (int d = 1;d <= K;++d)
	{
		for (int n = 0;n <= N;++n)
			for (int m = 0;m <= M;++m)
				G[0][n][m] = F[n][m];
		memset(G[1], 0, sizeof(G[1]));
		for (int m = 0;m <= M;++m)
			for (int x = 0, xs;x <= N;++x)
			{
				xs = Mult(Mult(power[d][x * (M - m)], power[K - d + 1][x * m]), Inv[x]);
				for (int n = 0;n <= N;++n)
					upd(G[1][n + x][m], Mult(G[0][n][m], xs));
			}
		memset(G[0], 0, sizeof(G[0]));
		for (int n = 0;n <= N;++n)
			for (int y = 0, xs;y <= M;++y)
			{
				xs = Mult(Mult(power[d][y * (N - n)], power[K - d + 1][y * n]), Inv[y]);
				for (int m = 0;m + y <= M;++m)
					upd(G[0][n][m + y], Mult(G[1][n][m], xs));
			}
		if (d == K)
			goto loop;
		memset(G[1], 0, sizeof(G[1]));
		for (int m = 0;m <= M;++m)
			for (int x = 0, xs;x <= N;++x)
			{
				xs = Mult(Mult(power[d][x * (M - m)], power[K - d][x * m]), Inv[x]);
				if (x & 1)
					xs = Sub(0, xs);
				for (int n = 0;n + x <= N;++n)
					upd(G[1][n + x][m], Mult(G[0][n][m], xs));
			}
		memset(G[0], 0, sizeof(G[0]));
		for (int n = 0;n <= N;++n)
			for (int y = 0, xs;y <= M;++y)
			{
				xs = Mult(Mult(power[d][y * (N - n)], power[K - d][y * n]), Inv[y]);
				if (y & 1)
					xs = Sub(0, xs);
				for (int m = 0;m + y <= M;++m)
					upd(G[0][n][m + y], Mult(G[1][n][m], xs));
			} 
		loop :
		for (int n = 0;n <= N;++n)
			for (int m = 0;m <= M;++m)
				F[n][m] = G[0][n][m];
	}
	printf("%d", Mult(F[N][M], Mult(Fac[N], Fac[M])));
	return 0;
}