#include <bits/stdc++.h>
using namespace std;
const int N = 103;
int n, m, K, mod, f[N][N], fac[N], inv[N];
int qpow(int b, int p) {
  int r = 1;
  for (; p; p >>= 1, b = (long long)b * b % mod)
    if (p & 1) {
      r = (long long)r * b % mod;
    }
  return r;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &K, &mod);
  f[0][0] = 1;
  fac[0] = fac[1] = inv[0] = inv[1] = 1;
  for (int i = 2; i <= max(n, m); i++) {
    fac[i] = (long long)fac[i - 1] * i % mod;
    inv[i] = mod - (long long)mod / i * inv[mod % i] % mod;
  }
  for (int i = 2; i <= max(n, m); i++) {
    inv[i] = (long long)inv[i] * inv[i - 1] % mod;
  }
  for (int step = 0; step < K << 1; step++) {
    int cnt1 = (step >> 1) + 1, cnt2 = K - (step >> 1);
    if (!(step & 1)) {
      for (int i = n; ~i; i--) {
        for (int j = m; ~j; j--)
          if (f[i][j]) {
            int coef =
                (long long)(qpow(cnt1, m - j) + mod - qpow(cnt1 - 1, m - j)) *
                qpow(cnt2, j) % mod;
            for (int l = 1, c = coef; i + l <= n;
                 l++, c = (long long)c * coef % mod) {
              f[i + l][j] =
                  (f[i + l][j] + (long long)f[i][j] * c % mod * fac[i + l] %
                                     mod * inv[i] % mod * inv[l]) %
                  mod;
            }
          }
      }
    } else {
      for (int j = m; ~j; j--) {
        for (int i = n; ~i; i--)
          if (f[i][j]) {
            int coef = (long long)qpow(cnt1, n - i) *
                       (qpow(cnt2, i) + mod - qpow(cnt2 - 1, i)) % mod;
            for (int l = 1, c = coef; j + l <= m;
                 l++, c = (long long)c * coef % mod) {
              f[i][j + l] =
                  (f[i][j + l] + (long long)f[i][j] * c % mod * fac[j + l] %
                                     mod * inv[j] % mod * inv[l]) %
                  mod;
            }
          }
      }
    }
  }
  printf("%d\n", f[n][m]);
}
