#include <bits/stdc++.h>
using namespace std;
int read() {
  char c = getchar();
  int d = 0, f = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') f = -1;
  for (; c >= '0' && c <= '9'; d = d * 10 + c - 48, c = getchar())
    ;
  return d * f;
}
using namespace std;
const int N = 105;
int n, m, k, Mo, C[N + 1][N + 1], f[N + 1][N + 1][N + 1][2];
int mi(int a, int b) {
  int s = 1;
  for (; b; b >>= 1, a = (long long)a * a % Mo)
    if (b & 1) s = (long long)s * a % Mo;
  return s;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &Mo);
  for (int i = 0; i <= N; ++i) C[i][0] = 1;
  for (int i = 1; i <= N; ++i)
    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 s = 1, ss = (mi(x + 1, m - j) - mi(x, m - j)) % Mo;
        ss = (long long)ss * mi(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 * s % Mo) %= Mo;
          s = (long long)s * ss % Mo;
        }
        s = 1;
        ss = (mi(k - x, i) - mi(k - x - 1, i)) % Mo;
        ss = (long long)ss * mi(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 * s % Mo) %= Mo;
          s = (long long)s * ss % Mo;
        }
      }
  printf("%d\n", f[k][n][m][0]);
  return 0;
}
