#include <bits/stdc++.h>
const int N = 110;
int dp[N][N][N][2];
int moder;
int comb[N][N], power[N][N];
void addmult(int &a, int b, int c) { a = (a + 1ll * b * c) % moder; }
int main() {
  int n, m, k;
  scanf("%d%d%d%d", &n, &m, &k, &moder);
  for (int i = 0; i < N; ++i) {
    comb[i][0] = 1;
    for (int j = 1; j <= i; ++j) {
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % moder;
    }
    power[i][0] = 1;
    for (int j = 1; j < N; ++j) {
      power[i][j] = 1ll * power[i][j - 1] * i % moder;
    }
  }
  dp[1][0][0][0] = 1;
  for (int i = 1; i <= k; ++i) {
    for (int j = 0; j <= n; ++j) {
      for (int K = 0; K <= m; ++K) {
        int now1 = 1, now2 = 1, coe1 = power[k - i + 1][j],
            coe2 = power[i][n - j] - power[i - 1][n - j];
        coe2 += coe2 < 0 ? moder : 0;
        for (int u = 0; K + u <= m; ++u) {
          addmult(dp[i][j][K + u][1], now1,
                  1ll * now2 * comb[m - K][u] % moder * dp[i][j][K][0] % moder);
          now1 = 1ll * now1 * coe1 % moder;
          now2 = 1ll * now2 * coe2 % moder;
        }
      }
    }
    for (int j = 0; j <= n; ++j) {
      for (int K = 0; K <= m; ++K) {
        int now1 = 1, now2 = 1, coe1 = power[k - i + 1][K] - power[k - i][K],
            coe2 = power[i][m - K];
        coe1 += coe1 < 0 ? moder : 0;
        for (int u = 0; j + u <= n; ++u) {
          addmult(dp[i + 1][j + u][K][0], now1,
                  1ll * now2 * comb[n - j][u] % moder * dp[i][j][K][1] % moder);
          now1 = 1ll * now1 * coe1 % moder;
          now2 = 1ll * now2 * coe2 % moder;
        }
      }
    }
  }
  printf("%d\n", dp[k + 1][n][m][0]);
  return 0;
}
