#include <bits/stdc++.h>
using namespace std;
const int Max_K(105);
const int Max_NM(105);
int N, M, K, MOD, F[Max_NM][Max_NM], G[2][Max_NM][Max_NM], C[Max_NM][Max_NM],
    power[Max_K][Max_NM * Max_NM];
inline int Add(int a, int b) { return a + b >= MOD ? a + b - MOD : a + b; }
inline int Sub(int a, int b) { return a - b < 0 ? a - b + MOD : a - b; }
inline int Mult(int a, int b) { return a * 1LL * b % MOD; }
inline void upd(int &a, int b) { a = Add(a, b); }
inline void inc(int &a, int b) { a = Sub(a, b); }
int main() {
  scanf("%d%d%d%d", &N, &M, &K, &MOD);
  C[0][0] = 1;
  for (int i = 1; i <= max(N, M); ++i) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; ++j) C[i][j] = Add(C[i - 1][j - 1], C[i - 1][j]);
  }
  for (int d = 1; d <= K; ++d) {
    power[d][0] = 1;
    for (int i = 1; i <= N * M; ++i) power[d][i] = Mult(power[d][i - 1], d);
  }
  F[0][0] = 1;
  for (int d = 1; d <= K; ++d) {
    for (int n = 0; n <= N; ++n)
      for (int m = 0; m <= M; ++m) G[0][n][m] = F[n][m];
    memset(G[1], 0, sizeof(G[1]));
    for (int n = 0; n <= N; ++n)
      for (int m = 0; m <= M; ++m)
        for (int x = 0; n + x <= N; ++x)
          upd(G[1][n + x][m],
              Mult(G[0][n][m],
                   Mult(C[N - n][x],
                        Mult(power[d][x * (M - m)], power[K - d + 1][x * m]))));
    memset(G[0], 0, sizeof(G[0]));
    for (int n = 0; n <= N; ++n)
      for (int m = 0; m <= M; ++m)
        for (int y = 0; m + y <= M; ++y)
          upd(G[0][n][m + y],
              Mult(G[1][n][m],
                   Mult(C[M - m][y],
                        Mult(power[d][y * (N - n)], power[K - d + 1][y * n]))));
    if (d == K) goto loop;
    memset(G[1], 0, sizeof(G[1]));
    for (int n = 0; n <= N; ++n)
      for (int m = 0; m <= M; ++m)
        for (int x = 0, val; n + x <= N; ++x) {
          val = Mult(G[0][n][m], Mult(C[N - n][x], Mult(power[d][x * (M - m)],
                                                        power[K - d][x * m])));
          if (x & 1)
            inc(G[1][n + x][m], val);
          else
            upd(G[1][n + x][m], val);
        }
    memset(G[0], 0, sizeof(G[0]));
    for (int n = 0; n <= N; ++n)
      for (int m = 0; m <= M; ++m)
        for (int y = 0, val; m + y <= M; ++y) {
          val = Mult(G[1][n][m], Mult(C[M - m][y], Mult(power[d][y * (N - n)],
                                                        power[K - d][y * n])));
          if (y & 1)
            inc(G[0][n][m + y], val);
          else
            upd(G[0][n][m + y], val);
        }
  loop:
    for (int n = 0; n <= N; ++n)
      for (int m = 0; m <= M; ++m) F[n][m] = G[0][n][m];
  }
  printf("%d", F[N][M]);
  return 0;
}
