#include <bits/stdc++.h>
using namespace std;
namespace mine {
long long qread() {
  long long ans = 0, f = 1;
  char c = getchar();
  while (c < '0' or c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while ('0' <= c and c <= '9') ans = ans * 10 + c - '0', c = getchar();
  return ans * f;
}
void write(long long num) {
  if (num < 0) putchar('-'), num = -num;
  if (num >= 10) write(num / 10);
  putchar('0' + num % 10);
}
void write1(long long num) {
  write(num);
  putchar(' ');
}
void write2(long long num) {
  write(num);
  putchar('\n');
}
template <typename T>
void chmax(T &x, const T y) {
  x = (x > y ? x : y);
}
template <typename T>
void chmin(T &x, const T y) {
  x = (x < y ? x : y);
}
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
const int INF = 0x3f3f3f3f;
int MOD;
inline int mm(const int x) { return x >= MOD ? x - MOD : x; }
template <typename T>
inline void add(T &x, const T y) {
  x = mm(x + y);
}
inline long long qpower(long long x, long long e, int mod = MOD) {
  long long ans = 1;
  if (e < 0) {
    puts("error");
    exit(666);
  }
  while (e) {
    if (e & 1) ans = ans * x % mod;
    x = x * x % mod;
    e >>= 1;
  }
  return ans;
}
long long invm(long long x) { return qpower(x, MOD - 2); }
const int N = 1e2 + 10;
int pp[N][N], C[N][N];
long long f[N][2][N][N];
void main() {
  int n = qread(), m = qread(), K = qread();
  MOD = qread();
  C[0][0] = 1;
  for (int i = (1), I = (N - 1); i <= I; i++) {
    C[i][0] = 1;
    for (int j = (1), I = (i); j <= I; j++)
      C[i][j] = mm(C[i - 1][j - 1] + C[i - 1][j]);
  }
  for (int num = (0), I = (N - 1); num <= I; num++)
    for (int k = (0), I = (N - 1); k <= I; k++)
      pp[num][k] = (num == 0 ? 0 : qpower(num, k));
  f[0][0][0][0] = 1;
  for (int u = (0), I = (K - 1); u <= I; u++) {
    for (int i = (0), I = (n); i <= I; i++)
      for (int j = (0), I = (m); j <= I; j++)
        for (int ad = (0), I = (n - i); ad <= I; ad++) {
          int ss = qpower(K - u, j) *
                   mm(pp[u + 1][m - j] + MOD - pp[u][m - j]) % MOD;
          ss = qpower(ss, ad);
          add(f[u][1][i + ad][j],
              f[u][0][i][j] * C[n - i][ad] % MOD * ss % MOD);
        }
    for (int i = (0), I = (n); i <= I; i++)
      for (int j = (0), I = (m); j <= I; j++)
        for (int ad = (0), I = (m - j); ad <= I; ad++) {
          int ss = qpower(u + 1, n - i) *
                   mm(pp[K - u][i] + MOD - pp[K - u - 1][i]) % MOD;
          ss = qpower(ss, ad);
          add(f[u + 1][0][i][j + ad],
              f[u][1][i][j] * C[m - j][ad] % MOD * ss % MOD);
        }
  }
  write(f[K][0][n][m]);
}
};  // namespace mine
signed main() {
  srand(time(0));
  mine::main();
}
