#include <bits/stdc++.h>
using namespace std;
long long mod;
long long ksm(long long b, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * b % mod;
    b = b * b % mod;
    n >>= 1;
  }
  return res;
}
long long f[2][105][105], pw[1005][1005], fac[105], inv[105];
long long C(long long n, long long m) {
  if (n < m) return 0;
  return fac[n] * inv[m] % mod * inv[n - m] % mod;
}
void init(long long n) {
  for (long long i = 0; i <= n; ++i) {
    pw[i][0] = 1;
    for (long long j = 1; j <= n * n; ++j) pw[i][j] = pw[i][j - 1] * i % mod;
  }
  fac[0] = 1;
  for (long long i = 1; i <= n; ++i) fac[i] = fac[i - 1] * i % mod;
  inv[n] = ksm(fac[n], mod - 2);
  for (long long i = n - 1; i >= 0; --i) inv[i] = (i + 1) * inv[i + 1] % mod;
}
void add(long long &x, long long y) { x = (x + y) % mod; }
signed main() {
  long long n, m, K;
  cin >> n >> m >> K >> mod;
  init(max(max(n, m), K));
  f[0][0][0] = 1;
  long long u = 1;
  for (long long k = 1; k <= K; ++k) {
    u ^= 1;
    memset(f[u ^ 1], 0, sizeof(f[u ^ 1]));
    for (long long i = 0; i <= n; ++i)
      for (long long j = 0; j <= m; ++j)
        if (f[u][i][j]) {
          for (long long a = 0; i + a <= n; ++a)
            add(f[u ^ 1][i + a][j], f[u][i][j] * C(n - i, a) % mod *
                                        pw[k][a * (m - j)] % mod *
                                        pw[K - k + 1][a * j] % mod);
        }
    u ^= 1;
    memset(f[u ^ 1], 0, sizeof(f[u ^ 1]));
    for (long long i = 0; i <= n; ++i)
      for (long long j = 0; j <= m; ++j)
        if (f[u][i][j]) {
          for (long long b = 0; j + b <= m; ++b)
            add(f[u ^ 1][i][j + b], f[u][i][j] * C(m - j, b) % mod *
                                        pw[k][b * (n - i)] % mod *
                                        pw[K - k + 1][b * i] % mod);
        }
    u ^= 1;
    memset(f[u ^ 1], 0, sizeof(f[u ^ 1]));
    for (long long i = 0; i <= n; ++i)
      for (long long j = 0; j <= m; ++j)
        if (f[u][i][j]) {
          long long tmp;
          for (long long a = 0; i + a <= n; ++a)
            tmp = f[u][i][j] * C(n - i, a) % mod * pw[k][a * (m - j)] % mod *
                  pw[K - k][a * j] % mod,
            add(f[u ^ 1][i + a][j], a & 1 ? mod - tmp : tmp);
        }
    u ^= 1;
    memset(f[u ^ 1], 0, sizeof(f[u ^ 1]));
    for (long long i = 0; i <= n; ++i)
      for (long long j = 0; j <= m; ++j)
        if (f[u][i][j]) {
          long long tmp;
          for (long long b = 0; j + b <= m; ++b)
            tmp = f[u][i][j] * C(m - j, b) % mod * pw[k][b * (n - i)] % mod *
                  pw[K - k][b * i] % mod,
            add(f[u ^ 1][i][j + b], b & 1 ? mod - tmp : tmp);
        }
  }
  cout << f[u][n][m];
  return 0;
}
