#include <bits/stdc++.h>
using namespace std;
const int N = 101;
int pw[N][N * N], fac[N], inv[N];
int f[N][N], g[N][N], coe[N][N];
int n, m, K, p;
inline int qpow(int A, int B) {
  int r = 1;
  while (B) {
    if (B & 1) r = (long long)r * A % p;
    A = (long long)A * A % p, B >>= 1;
  }
  return r;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &K, &p);
  for (int i = 0; i <= K; ++i)
    for (int j = pw[i][0] = 1; j <= n * m; ++j)
      pw[i][j] = (long long)pw[i][j - 1] * i % p;
  int t = n;
  if (n < m) t = m;
  for (int i = fac[0] = 1; i <= t; ++i) fac[i] = (long long)fac[i - 1] * i % p;
  inv[t] = qpow(fac[t], p - 2);
  for (int i = t; i; --i) inv[i - 1] = (long long)inv[i] * i % p;
  g[0][0] = 1;
  for (int t = 1; t <= K; ++t) {
    swap(f, g);
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        coe[i][j] = (long long)pw[t][i * (m - j)] * pw[K - t + 1][i * j] % p *
                    inv[i] % p;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        int& v = g[i][j];
        v = 0;
        for (int k = 0; k <= i; ++k)
          v = (v + (long long)f[i - k][j] * coe[k][j]) % p;
      }
    swap(f, g);
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        coe[i][j] =
            (long long)pw[t][i * (m - j)] * pw[K - t][i * j] % p * inv[i] % p;
        if (i & 1) coe[i][j] = (long long)coe[i][j] * (p - 1) % p;
      }
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        int& v = g[i][j];
        v = 0;
        for (int k = 0; k <= i; ++k)
          v = (v + (long long)f[i - k][j] * coe[k][j]) % p;
      }
    swap(f, g);
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        coe[i][j] = (long long)pw[t][j * (n - i)] * pw[K - t + 1][i * j] % p *
                    inv[j] % p;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        int& v = g[i][j];
        v = 0;
        for (int k = 0; k <= j; ++k)
          v = (v + (long long)f[i][j - k] * coe[i][k]) % p;
      }
    swap(f, g);
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        coe[i][j] =
            (long long)pw[t][j * (n - i)] * pw[K - t][i * j] % p * inv[j] % p;
        if (j & 1) coe[i][j] = (long long)coe[i][j] * (p - 1) % p;
      }
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        int& v = g[i][j];
        v = 0;
        for (int k = 0; k <= j; ++k)
          v = (v + (long long)f[i][j - k] * coe[i][k]) % p;
      }
  }
  printf("%lld\n", (long long)f[n][m] * fac[n] % p * fac[m] % p);
  return 0;
}
