#include <cstring>
#include <iostream>

const int N = 100 + 3;

int n, m, k, mod;
int h[2][N][N], (*f)[N] = h[0], (*g)[N] = h[1];
int bin[N][N], pow[N][N];

int main() {
//	freopen("code.in", "r", stdin);
//	freopen("code.out", "w", stdout);

	scanf("%d%d%d%d", &n, &m, &k, &mod);
	if (n < m) std::swap(n, m);
	for (int i = 0; i <= std::max(n, k); ++i)
		for (int j = bin[i][0] = 1; j <= i; ++j)
			bin[i][j] = (bin[i - 1][j - 1] + bin[i - 1][j]) % mod;
	for (int i = 0; i <= std::max(n, k); ++i)
		for (int j = pow[i][0] = 1; j <= std::max(n, k); ++j)
			pow[i][j] = 1ll * pow[i][j - 1] * i % mod;
	f[0][0] = 1;
	for (int t = 0; t < k; ++t) {
		auto clear = []() {
			for (int i = 0; i <= n; ++i) memset(f[i], 0, sizeof(int) * (m + 1));
		};
		std::swap(f, g), clear();
		for (int i = 0; i <= n; ++i) for (int j = 0; j <= m; ++j) {
			if (!g[i][j]) continue;
			int x = 1, y = 1ll * pow[t + 1][m - j] * pow[k - t][j] % mod;
			for (int l = 0; i + l <= n; ++l, x = 1ll * x * y % mod)
				f[i + l][j] = (f[i + l][j] + 1ll * bin[n - i][l] * x % mod * g[i][j]) % mod;
		}

		std::swap(f, g), clear();
		for (int i = 0; i <= n; ++i) for (int j = 0; j <= m; ++j) {
			if (!g[i][j]) continue;
			int x = 1, y = 1ll * pow[t + 1][n - i] * pow[k - t][i] % mod;
			for (int l = 0; j + l <= m; ++l, x = 1ll * x * y % mod)
				f[i][j + l] = (f[i][j + l] + 1ll * bin[m - j][l] * x % mod * g[i][j]) % mod;
		}

		std::swap(f, g), clear();
		for (int i = 0; i <= n; ++i) for (int j = 0; j <= m; ++j) {
			if (!g[i][j]) continue;
			int x = 1, y = -1ll * pow[t + 1][m - j] * pow[k - t - 1][j] % mod;
			for (int l = 0; i + l <= n; ++l, x = 1ll * x * y % mod)
				f[i + l][j] = (f[i + l][j] + 1ll * bin[n - i][l] * x % mod * g[i][j]) % mod;
		}

		std::swap(f, g), clear();
		for (int i = 0; i <= n; ++i) for (int j = 0; j <= m; ++j) {
			if (!g[i][j]) continue;
			int x = 1, y = -1ll * pow[t + 1][n - i] * pow[k - t - 1][i] % mod;
			for (int l = 0; j + l <= m; ++l, x = 1ll * x * y % mod)
				f[i][j + l] = (f[i][j + l] + 1ll * bin[m - j][l] * x % mod * g[i][j]) % mod;
		}
	}
	printf("%d", (f[n][m] + mod) % mod);

	return 0;
}
