#include <bits/stdc++.h>
using namespace std;
int dp[105][105], dp2[105][105], dp3[105][105], dp4[105][105], n, m, k, p,
    fr[105], ifr[105], pw[105][105], inv[105];
int doit(int a, int b) {
  int as = 1;
  while (b) {
    if (b & 1) as = 1ll * as * a % p;
    a = 1ll * a * a % p;
    b >>= 1;
  }
  return as;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &p);
  for (int i = 1; i <= 100; i++) {
    pw[i][0] = 1;
    for (int j = 1; j <= 100; j++) pw[i][j] = 1ll * pw[i][j - 1] * i % p;
  }
  fr[0] = ifr[0] = inv[0] = 1;
  for (int i = 1; i <= 100; i++)
    fr[i] = 1ll * fr[i - 1] * i % p, ifr[i] = doit(fr[i], p - 2),
    inv[i] = doit(i, p - 2);
  dp[0][0] = 1;
  pw[0][0] = 1;
  for (int i = k; i >= 1; i--) {
    for (int j = 0; j <= n; j++)
      for (int s = 0; s <= m; s++)
        if (dp[s][j]) {
          int s1 = dp[s][j], s2 = 1ll * pw[k - i][n - j] * pw[i][j] % p;
          for (int t = 0; t + s <= m; t++)
            dp2[j][t + s] =
                (dp2[j][t + s] + s1) - (dp2[j][t + s] + s1 >= p ? p : 0),
                       s1 = p - 1ll * s1 * s2 % p * inv[t + 1] % p;
          dp[s][j] = 0;
        }
    for (int s = 0; s <= m; s++)
      for (int j = 0; j <= n; j++)
        if (dp2[j][s]) {
          int s1 = dp2[j][s], s2 = 1ll * pw[k - i][m - s] * pw[i][s] % p;
          for (int t = 0; t + j <= n; t++)
            dp3[s][j + t] =
                (dp3[s][j + t] + s1) - (dp3[s][j + t] + s1 >= p ? p : 0),
                       s1 = p - 1ll * s1 * s2 % p * inv[t + 1] % p;
          dp2[j][s] = 0;
        }
    for (int j = 0; j <= n; j++)
      for (int s = 0; s <= m; s++)
        if (dp3[s][j]) {
          int s1 = dp3[s][j], s2 = 1ll * pw[k - i + 1][n - j] * pw[i][j] % p;
          for (int t = 0; t + s <= m; t++)
            dp4[j][t + s] =
                (dp4[j][t + s] + s1) - (dp4[j][t + s] + s1 >= p ? p : 0),
                       s1 = 1ll * s1 * s2 % p * inv[t + 1] % p;
          dp3[s][j] = 0;
        }
    for (int s = 0; s <= m; s++)
      for (int j = 0; j <= n; j++)
        if (dp4[j][s]) {
          int s1 = dp4[j][s], s2 = 1ll * pw[k - i + 1][m - s] * pw[i][s] % p;
          for (int t = 0; t + j <= n; t++)
            dp[s][j + t] =
                (dp[s][j + t] + s1) - (dp[s][j + t] + s1 >= p ? p : 0),
                      s1 = 1ll * s1 * s2 % p * inv[t + 1] % p;
          dp4[j][s] = 0;
        }
    for (int j = 0; j < n; j++) dp[m][j] = 0;
    for (int j = 0; j < m; j++) dp[j][n] = 0;
  }
  printf("%d\n", 1ll * dp[m][n] * fr[n] % p * fr[m] % p);
}
