#include <bits/stdc++.h>
int read() {
  int r = 0, t = 1, c = getchar();
  while (c < '0' || c > '9') {
    t = c == '-' ? -1 : 1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    r = (r << 3) + (r << 1) + (c ^ 48);
    c = getchar();
  }
  return r * t;
}
const int N = 110;
long long f[N][N], F[N][N], n, m, k, mod, C[N][N], p[N][N * N], P[N][N][N];
long long &Add(long long &a, long long b) { return a = (a + b) % mod; }
long long power(long long a, long long b, long long p) {
  long long r = 1;
  for (; b; b >>= 1, a = a * a % p)
    if (b & 1) r = r * a % p;
  return r;
}
int main() {
  n = read();
  m = read();
  k = read();
  mod = read();
  for (int i = (0), end_i = (100); i <= end_i; i++) C[i][0] = C[i][i] = 1;
  for (int i = (1), end_i = (100); i <= end_i; i++)
    for (int j = (1), end_j = (i - 1); j <= end_j; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
  for (int i = (0), end_i = (100); i <= end_i; i++)
    for (int j = (0), end_j = (10000); j <= end_j; j++)
      p[i][j] = power(i, j, mod);
  f[0][0] = 1;
  for (int l = (1), end_l = (k); l <= end_l; l++)
    for (int i = (0), end_i = (std::max(n, m)); i <= end_i; i++)
      for (int j = (0), end_j = (std::max(n, m)); j <= end_j; j++)
        P[l][i][j] = power(p[l][i] + mod - p[l - 1][i], j, mod);
  for (int l = (1), end_l = (k); l <= end_l; l++) {
    for (int i = (0), end_i = (n); i <= end_i; i++)
      for (int j = (0), end_j = (m); j <= end_j; j++) F[i][j] = 0;
    for (int i = (0), end_i = (n); i <= end_i; i++)
      for (int j = (0), end_j = (m); j <= end_j; j++)
        for (int o = (i), end_o = (n); o <= end_o; o++)
          Add(F[o][j], f[i][j] * C[o][i] % mod * P[l][m - j][o - i] *
                           p[k - l + 1][j * (o - i)]);
    for (int i = (0), end_i = (n); i <= end_i; i++)
      for (int j = (0), end_j = (m); j <= end_j; j++) f[i][j] = 0;
    for (int i = (0), end_i = (n); i <= end_i; i++)
      for (int j = (0), end_j = (m); j <= end_j; j++)
        for (int o = (j), end_o = (m); o <= end_o; o++)
          Add(f[i][o], F[i][j] * C[o][j] % mod * P[k - l + 1][i][o - j] % mod *
                           p[l][(n - i) * (o - j)]);
  }
  printf("%d\n", int(f[n][m]));
  return 0;
}
