#include <bits/stdc++.h>
using namespace std;
int dp[105][105][105], dp2[105][105][105], dp3[105][105][105],
    dp4[105][105][105], n, m, k, p, fr[105], ifr[105], pw[105][105 * 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 <= 10000; j++) pw[i][j] = 1ll * pw[i][j - 1] * i % p;
  }
  fr[0] = ifr[0] = 1;
  for (int i = 1; i <= 100; i++)
    fr[i] = 1ll * fr[i - 1] * i % p, ifr[i] = doit(fr[i], p - 2);
  dp[0][0][k + 1] = 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++)
        for (int t = 0; t + s <= m; t++)
          dp2[j][t + s][i] =
              (dp2[j][t + s][i] + 1ll * pw[k - i][(n - j) * t] * pw[i][j * t] %
                                      p * ((t & 1) ? p - 1 : 1) % p *
                                      dp[j][s][i + 1] % p * ifr[t]) %
              p;
    for (int s = 0; s <= m; s++)
      for (int j = 0; j <= n; j++)
        for (int t = 0; t + j <= n; t++)
          dp3[j + t][s][i] =
              (dp3[j + t][s][i] + 1ll * pw[k - i][(m - s) * t] * pw[i][s * t] %
                                      p * ((t & 1) ? p - 1 : 1) % p *
                                      dp2[j][s][i] % p * ifr[t]) %
              p;
    for (int j = 0; j <= n; j++)
      for (int s = 0; s <= m; s++)
        for (int t = 0; t + s <= m; t++)
          dp4[j][t + s][i] = (dp4[j][t + s][i] +
                              1ll * pw[k - i + 1][(n - j) * t] * pw[i][j * t] %
                                  p * dp3[j][s][i] % p * ifr[t]) %
                             p;
    for (int s = 0; s <= m; s++)
      for (int j = 0; j <= n; j++)
        for (int t = 0; t + j <= n; t++)
          dp[j + t][s][i] = (dp[j + t][s][i] +
                             1ll * pw[k - i + 1][(m - s) * t] * pw[i][s * t] %
                                 p * dp4[j][s][i] % p * ifr[t]) %
                            p;
    for (int j = 0; j < n; j++) dp[j][m][i] = 0;
    for (int j = 0; j < m; j++) dp[n][j][i] = 0;
  }
  printf("%d\n", 1ll * dp[n][m][1] * fr[n] % p * fr[m] % p);
}
