#include <bits/stdc++.h>
long long gi() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) f ^= ch == '-', ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f ? x : -x;
}
std::mt19937 rnd(time(NULL));
template <class T>
void cxk(T& a, T b) {
  a = a > b ? a : b;
}
template <class T>
void cnk(T& a, T b) {
  a = a < b ? a : b;
}
int mod;
int pow(int x, int y) {
  int ret = 1;
  while (y) {
    if (y & 1) ret = 1ll * ret * x % mod;
    x = 1ll * x * x % mod;
    y >>= 1;
  }
  return ret;
}
template <class Ta, class Tb>
void inc(Ta& a, Tb b) {
  a = a + b >= mod ? a + b - mod : a + b;
}
template <class Ta, class Tb>
void dec(Ta& a, Tb b) {
  a = a >= b ? a - b : a + mod - b;
}
int g[101][101], C[101][101], pw[101][10086], f[2][101][101];
int main() {
  int n = gi(), m = gi(), k = gi();
  mod = gi();
  C[0][0] = 1;
  pw[0][0] = 1;
  for (int i = 1; i <= 100; ++i) {
    C[i][0] = 1;
    for (int j = 1; j <= i; ++j)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
    pw[i][0] = 1;
    for (int j = 1; j <= 10000; ++j) pw[i][j] = 1ll * pw[i][j - 1] * i % mod;
  }
  f[0][0][0] = 1;
  int t = 0;
  for (int o = 1; o <= k; ++o) {
    memset(f[!t], 0, sizeof f[!t]);
    for (int j = 0; j <= m; ++j)
      for (int i = 0; i <= n; ++i)
        g[j][i] = 1ll * pw[o][i * (m - j)] * pw[k - o + 1][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        if (!f[t][i][j]) continue;
        int w = f[t][i][j];
        for (int ni = i; ni <= n; ++ni)
          inc(f[!t][ni][j], 1ll * w * C[ni][i] % mod * g[j][ni - i] % mod);
      }
    t ^= 1;
    memset(f[!t], 0, sizeof f[!t]);
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        g[i][j] = 1ll * pw[o][j * (n - i)] * pw[k - o + 1][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        if (!f[t][i][j]) continue;
        int w = f[t][i][j];
        for (int nj = j; nj <= m; ++nj)
          inc(f[!t][i][nj], 1ll * w * C[nj][j] % mod * g[i][nj - j] % mod);
      }
    t ^= 1;
    memset(f[!t], 0, sizeof f[!t]);
    for (int j = 0; j <= m; ++j)
      for (int i = 0; i <= n; ++i)
        g[j][i] = 1ll * pw[o][i * (m - j)] * pw[k - o][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        if (!f[t][i][j]) continue;
        int w = f[t][i][j];
        for (int ni = i; ni <= n; ni += 2)
          inc(f[!t][ni][j], 1ll * w * C[ni][i] % mod * g[j][ni - i] % mod);
        for (int ni = i + 1; ni <= n; ni += 2)
          inc(f[!t][ni][j],
              mod - 1ll * w * C[ni][i] % mod * g[j][ni - i] % mod);
      }
    t ^= 1;
    memset(f[!t], 0, sizeof f[!t]);
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        g[i][j] = 1ll * pw[o][j * (n - i)] * pw[k - o][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j) {
        if (!f[t][i][j]) continue;
        int w = f[t][i][j];
        for (int nj = j; nj <= m; nj += 2)
          inc(f[!t][i][nj], 1ll * w * C[nj][j] % mod * g[i][nj - j] % mod);
        for (int nj = j + 1; nj <= m; nj += 2)
          inc(f[!t][i][nj],
              mod - 1ll * w * C[nj][j] % mod * g[i][nj - j] % mod);
      }
    t ^= 1;
  }
  printf("%d\n", f[t][n][m]);
  return 0;
}
