#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const int maxn = 105;

inline int gi()
{
	char c = getchar();
	while (c < '0' || c > '9') c = getchar();
	int sum = 0;
	while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar();
	return sum;
}

int mod;
inline int add(int x, int y) {return x + y > mod ? x + y - mod : x + y;}
inline int sub(int x, int y) {return x < y ? x - y + mod : x - y;}
inline void inc(int &x, int y) {x += y; if (x >= mod) x -= mod;}
inline void dec(int &x, int y) {x -= y; if (x < 0) x += mod;} 

int n, m, t;
int c[maxn][maxn], pw[maxn][maxn * maxn], f[2][maxn][maxn], tr[maxn][maxn];

void init()
{
	for (int i = 0; i <= n; ++i)
		for (int j = c[i][0] = 1; j <= i; ++j)
			c[i][j] = add(c[i - 1][j - 1], c[i - 1][j]);
	for (int i = 0; i <= t; ++i)
		for (int j = pw[i][0] = 1; j <= n * m; ++j) pw[i][j] = (ll)pw[i][j - 1] * i % mod;
}

int main()
{
	n = gi(); m = gi(); t = gi(); mod = gi();
	if (n < m) swap(n, m);
	init();

	int cur = 0;
	f[0][0][0] = 1;
	for (int k = 1; k <= t; ++k) {
		cur ^= 1; memset(f[cur], 0, sizeof(f[cur]));
		for (int j = 0; j <= m; ++j)
			for (int i = 0; i <= n; ++i) tr[j][i] = (ll)pw[k][i * (m - j)] * pw[t - k + 1][i * j] % mod;
		for (int i = 0; i <= n; ++i)
			for (int j = 0; j <= m; ++j)
				if (f[cur ^ 1][i][j]) {
					for (int l = 0; l + i <= n; ++l)
						f[cur][i + l][j] = (f[cur][i + l][j] + (ll)f[cur ^ 1][i][j] * c[i + l][i] % mod * tr[j][l]) % mod;
				}
		cur ^= 1; memset(f[cur], 0, sizeof(f[cur]));
		for (int i = 0; i <= n; ++i)
			for (int j = 0; j <= m; ++j) tr[i][j] = (ll)pw[k][j * (n - i)] * pw[t - k + 1][i * j] % mod;
		for (int i = 0; i <= n; ++i)
			for (int j = 0; j <= m; ++j)
				if (f[cur ^ 1][i][j]) {
					for (int l = 0; l + j <= m; ++l)
						f[cur][i][j + l] = (f[cur][i][j + l] + (ll)f[cur ^ 1][i][j] * c[j + l][j] % mod * tr[i][l]) % mod;
				}
		cur ^= 1; memset(f[cur], 0, sizeof(f[cur]));
		for (int j = 0; j <= m; ++j)
			for (int i = 0; i <= n; ++i) tr[j][i] = (ll)pw[k][i * (m - j)] * pw[t - k][i * j] % mod;
		for (int i = 0; i <= n; ++i)
			for (int j = 0; j <= m; ++j)
				if (f[cur ^ 1][i][j]) {
					for (int l = 0; l + i <= n; ++l)
						if (~l & 1) f[cur][i + l][j] = (f[cur][i + l][j] + (ll)f[cur ^ 1][i][j] * c[i + l][i] % mod * tr[j][l]) % mod;
						else f[cur][i + l][j] = (f[cur][i + l][j] + (ll)(mod - f[cur ^ 1][i][j]) * c[i + l][i] % mod * tr[j][l]) % mod;
				}
		cur ^= 1; memset(f[cur], 0, sizeof(f[cur]));
		for (int i = 0; i <= n; ++i)
			for (int j = 0; j <= m; ++j) tr[i][j] = (ll)pw[k][j * (n - i)] * pw[t - k][i * j] % mod;
		for (int i = 0; i <= n; ++i)
			for (int j = 0; j <= m; ++j)
				if (f[cur ^ 1][i][j]) {
					for (int l = 0; l + j <= m; ++l)
						if (~l & 1) f[cur][i][j + l] = (f[cur][i][j + l] +  (ll)f[cur ^ 1][i][j] * c[j + l][j] % mod * tr[i][l]) % mod;
						else f[cur][i][j + l] = (f[cur][i][j + l] + (ll)(mod - f[cur ^ 1][i][j]) * c[j + l][j] % mod * tr[i][l]) % mod;
				}
	}
	printf("%d\n", f[cur][n][m]);
	
	return 0;
}