#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int N, M, K, mod;
int pw[maxn][maxn * maxn], binom[maxn][maxn];
int f[maxn][maxn][maxn], g[maxn][maxn][maxn], t[maxn][maxn][maxn];
int s[maxn], p[maxn];
int qpow(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;
}
int main() {
  scanf("%d%d%d%d", &N, &M, &K, &mod);
  for (int i = 0; i <= 100; i++) binom[i][0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= 100; j++) {
      binom[i][j] = (binom[i - 1][j] + binom[i - 1][j - 1]) % mod;
    }
  }
  for (int i = 0; i <= 100; i++) {
    pw[i][0] = 1;
    for (int j = 1; j <= 10000; j++) {
      pw[i][j] = 1LL * pw[i][j - 1] * i % mod;
    }
  }
  for (int k = 0; k <= K; k++) {
    int w = 1LL * (K - k) * qpow(K - k + 1, mod - 2) % mod;
    for (int n = 0; n <= N; n++) {
      for (int i = 0; i <= n; i++) {
        s[i] = 1;
        p[i] = (qpow(w, i) + mod - qpow(w, n)) % mod;
      }
      for (int m = 0; m <= M; m++) {
        for (int i = 0; i <= n; i++) {
          if (i & 1) {
            t[n][m][k] =
                (t[n][m][k] + mod - 1LL * binom[n][i] * s[i] % mod) % mod;
          } else {
            t[n][m][k] = (t[n][m][k] + 1LL * binom[n][i] * s[i] % mod) % mod;
          }
        }
        t[n][m][k] = 1LL * t[n][m][k] * pw[K - k + 1][n * m] % mod;
        for (int i = 0; i <= n; i++) s[i] = 1LL * s[i] * p[i] % mod;
      }
    }
  }
  for (int k = 1; k <= K; k++) {
    for (int n = 1; n <= N; n++) {
      for (int m = 1; m <= M; m++) {
        int p1 = 1, p2 = 1;
        int b1 = (qpow(K - k + 1, m) - qpow(K - k, m) + mod) % mod,
            b2 = (qpow(K - k + 1, n) - qpow(K - k, n) + mod) % mod;
        f[n][m][k] =
            1LL * qpow(k, n * (M - m) + m * (N - n) + n * m) * t[n][m][k] % mod;
        for (int c = 0; c < m; c++) {
          g[n][m][k] =
              (g[n][m][k] + 1LL * binom[m][c] * p2 % mod * pw[k][c * (N - n)] %
                                mod * f[n][m - c][k - 1] % mod) %
              mod;
          p2 = 1LL * p2 * b2 % mod;
        }
        for (int c = 0; c < n; c++) {
          f[n][m][k] =
              (f[n][m][k] + 1LL * binom[n][c] * p1 % mod * pw[k][c * (M - m)] %
                                mod * g[n - c][m][k] % mod) %
              mod;
          p1 = 1LL * p1 * b1 % mod;
        }
      }
    }
  }
  printf("%d\n", f[N][M][K]);
  return 0;
}
