#include <bits/stdc++.h>
using namespace std;
long long n, m, p, mod, ans, f[105][4][105][105], fac[105], ifac[105];
void upd(long long &x, long long y) { x = (x + y) % mod; }
long long inv(long long x) {
  return x == 1 ? 1 : (mod - mod / x) * inv(mod % x) % mod;
}
long long C(long long x, long long y) {
  return fac[x] * ifac[y] % mod * ifac[x - y] % mod;
}
int main() {
  scanf("%lld%lld%lld%lld", &n, &m, &p, &mod);
  if (n < m) swap(n, m);
  fac[0] = 1;
  for (long long i = 1; i <= n; ++i) fac[i] = fac[i - 1] * i % mod;
  ifac[n] = inv(fac[n]);
  for (long long i = n - 1; ~i; --i) ifac[i] = ifac[i + 1] * (i + 1) % mod;
  f[p + 1][3][n][m] = 1;
  for (long long i = p; i; --i) {
    long long prd1, prd2;
    prd1 = prd2 = 1;
    for (long long j = 1; j <= n; ++j) prd2 = prd2 * i % mod;
    for (long long j = 0; j <= n; ++j) {
      for (long long k = 0; k <= m; ++k)
        if (f[i + 1][3][j][k]) {
          long long tmp = 1;
          for (long long l = 0; l <= k; ++l) {
            upd(f[i][0][j][k - l], f[i + 1][3][j][k] * tmp % mod * ifac[l]);
            tmp = tmp * prd1 % mod * prd2 % mod;
          }
        }
      prd1 = prd1 * (p - i + 1) % mod;
      prd2 = prd2 * inv(i) % mod;
    }
    prd1 = prd2 = 1;
    for (long long k = 1; k <= m; ++k) prd2 = prd2 * i % mod;
    for (long long k = 0; k <= m; ++k) {
      for (long long j = 0; j <= n; ++j)
        if (f[i][0][j][k]) {
          long long tmp = 1;
          for (long long l = 0; l <= j; ++l) {
            upd(f[i][1][j - l][k], f[i][0][j][k] * tmp % mod * ifac[l]);
            tmp = tmp * prd1 % mod * prd2 % mod;
          }
        }
      prd1 = prd1 * (p - i + 1) % mod;
      prd2 = prd2 * inv(i) % mod;
    }
    if (i > 1) {
      prd1 = prd2 = 1;
      for (long long j = 1; j <= n; ++j) prd2 = prd2 * (i - 1) % mod;
      for (long long j = 0; j <= n; ++j) {
        for (long long k = 0; k <= m; ++k)
          if (f[i][1][j][k]) {
            long long tmp = 1;
            for (long long l = 0; l <= k; ++l) {
              upd(f[i][2][j][k - l], f[i][1][j][k] * tmp % mod * ifac[l]);
              tmp = -tmp * prd1 % mod * prd2 % mod;
            }
          }
        prd1 = prd1 * (p - i + 1) % mod;
        prd2 = prd2 * inv(i - 1) % mod;
      }
      prd1 = prd2 = 1;
      for (long long k = 1; k <= m; ++k) prd2 = prd2 * (i - 1) % mod;
      for (long long k = 0; k <= m; ++k) {
        for (long long j = 0; j <= n; ++j)
          if (f[i][2][j][k]) {
            long long tmp = 1;
            for (long long l = 0; l <= j; ++l) {
              upd(f[i][3][j - l][k], f[i][2][j][k] * tmp % mod * ifac[l]);
              tmp = -tmp * prd1 % mod * prd2 % mod;
            }
          }
        prd1 = prd1 * (p - i + 1) % mod;
        prd2 = prd2 * inv(i - 1) % mod;
      }
    } else {
      memcpy(f[i][2], f[i][1], sizeof f[i][2]);
      memcpy(f[i][3], f[i][2], sizeof f[i][3]);
    }
  }
  ans = (f[1][3][0][0] * fac[n] % mod * fac[m] % mod + mod) % mod;
  printf("%lld\n", ans);
  return 0;
}
