#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, m, k, Mo, C[N][N], f[N][N][N][2];
int pwr(int x, int y) {
  int z = 1;
  for (; y; y >>= 1, x = (long long)x * x % Mo)
    if (y & 1) z = (long long)z * x % Mo;
  return z;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &Mo);
  for (int i = 0; i <= max(n, m); i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % Mo;
  }
  f[0][0][0][0] = 1;
  for (int x = 0; x <= k - 1; x++)
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) {
        int ret = 1, cnt = (pwr(x + 1, m - j) - pwr(x, m - j)) % Mo;
        cnt = (long long)cnt * pwr(k - x, j) % Mo;
        for (int l = 0; l <= n - i; l++) {
          (f[x][i + l][j][1] +=
           (long long)f[x][i][j][0] * C[n - i][l] % Mo * ret % Mo) %= Mo;
          ret = (long long)ret * cnt % Mo;
        }
        ret = 1;
        cnt = (pwr(k - x, i) - pwr(k - x - 1, i)) % Mo;
        cnt = (long long)cnt * pwr(x + 1, n - i) % Mo;
        for (int l = 0; l <= m - j; l++) {
          (f[x + 1][i][j + l][0] +=
           (long long)f[x][i][j][1] * C[m - j][l] % Mo * ret % Mo) %= Mo;
          ret = (long long)ret * cnt % Mo;
        }
      }
  printf("%d\n", f[k][n][m][0]);
  return 0;
}
