#include <bits/stdc++.h>
using namespace std;
int read() {
  int x = 0;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    ;
  for (; isdigit(ch); ch = getchar()) x = (x << 3) + (x << 1) + (ch ^ 48);
  return x;
}
const int MAXW = 100;
int Mod;
int C[110][110];
int n, m, K, nm;
int dp[2][110][110];
bool dpcur;
inline void add(int &x, long long y) { x = (x + y) % Mod; }
int p[110][10010];
int main() {
  n = read(), m = read(), K = read(), Mod = read();
  nm = n * m;
  for (int i = 0; i <= MAXW; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % Mod;
  }
  for (int i = 0; i <= K; i++) {
    p[i][0] = 1;
    for (int j = 1; j <= nm; j++) p[i][j] = 1LL * p[i][j - 1] * i % Mod;
  }
  dp[dpcur][0][0] = 1;
  for (int k = 1; k <= K; k++) {
    dpcur ^= 1;
    memset(dp[dpcur], 0, sizeof dp[dpcur]);
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++)
        for (int u = 0; i + u <= n; u++) {
          add(dp[dpcur][i + u][j], 1LL * dp[dpcur ^ 1][i][j] * C[n - i][u] %
                                       Mod * p[k][u * (m - j)] % Mod *
                                       p[K - k + 1][u * j]);
        }
    dpcur ^= 1;
    memset(dp[dpcur], 0, sizeof dp[dpcur]);
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++)
        for (int v = 0; j + v <= m; v++) {
          add(dp[dpcur][i][j + v], 1LL * dp[dpcur ^ 1][i][j] * C[m - j][v] %
                                       Mod * p[k][v * (n - i)] % Mod *
                                       p[K - k + 1][v * i]);
        }
    dpcur ^= 1;
    memset(dp[dpcur], 0, sizeof dp[dpcur]);
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) {
        for (int u = 0; i + u <= n; u += 2) {
          add(dp[dpcur][i + u][j], 1LL * dp[dpcur ^ 1][i][j] * C[n - i][u] %
                                       Mod * p[k][u * (m - j)] % Mod *
                                       p[K - k][u * j]);
        }
        for (int u = 1; i + u <= n; u += 2) {
          add(dp[dpcur][i + u][j], -1LL * dp[dpcur ^ 1][i][j] * C[n - i][u] %
                                       Mod * p[k][u * (m - j)] % Mod *
                                       p[K - k][u * j]);
        }
      }
    dpcur ^= 1;
    memset(dp[dpcur], 0, sizeof dp[dpcur]);
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) {
        for (int v = 0; j + v <= m; v += 2) {
          add(dp[dpcur][i][j + v], 1LL * dp[dpcur ^ 1][i][j] * C[m - j][v] %
                                       Mod * p[k][v * (n - i)] % Mod *
                                       p[K - k][v * i]);
        }
        for (int v = 1; j + v <= m; v += 2) {
          add(dp[dpcur][i][j + v], -1LL * dp[dpcur ^ 1][i][j] * C[m - j][v] %
                                       Mod * p[k][v * (n - i)] % Mod *
                                       p[K - k][v * i]);
        }
      }
  }
  int ans = dp[dpcur][n][m];
  printf("%d\n", (ans + Mod) % Mod);
  return 0;
}
