#include <bits/stdc++.h>
using namespace std;
int Mod;
int add(int a, int b) { return a + b >= Mod ? a + b - Mod : a + b; }
int dec(int a, int b) { return a - b < 0 ? a - b + Mod : a - b; }
int mul(int a, int b) { return 1ll * a * b % Mod; }
void Add(int &a, int b) { a = add(a, b); }
void Dec(int &a, int b) { a = dec(a, b); }
void Mul(int &a, int b) { a = mul(a, b); }
int ksm(int a, int b) {
  int ans = 1;
  for (; b; b >>= 1, Mul(a, a))
    if (b & 1) Mul(ans, a);
  return ans;
}
const int N = 105;
int n, m, k, fc[N], ifc[N];
int dp[2][N][N];
void fc_init(int n) {
  fc[0] = fc[1] = ifc[0] = ifc[1] = 1;
  for (int i = 2; i <= n; i++) fc[i] = mul(fc[i - 1], i);
  ifc[n] = ksm(fc[n], Mod - 2);
  for (int i = n - 1; i >= 2; i--) ifc[i] = mul(ifc[i + 1], i + 1);
}
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &Mod);
  int now = 0, nxt = 1;
  dp[0][0][0] = 1;
  fc_init(max(n, m));
  for (int t = 1, a, b; t <= k; t++) {
    for (int i = 0; i <= n; i++)
      for (int j = 0, coe; j <= m; j++)
        if (coe = dp[now][i][j]) {
          int a = ksm(k - t + 1, j), b = ksm(t, m - j);
          for (int c = 0, ma = 1, mb = 1; c <= n - i; c++)
            Add(dp[nxt][i + c][j], mul(mul(ifc[c], coe), mul(ma, mb))),
                Mul(ma, a), Mul(mb, b);
        }
    swap(now, nxt), memset(dp[nxt], 0, sizeof(dp[nxt]));
    for (int i = 0; i <= n; i++)
      for (int j = 0, coe; j <= m; j++)
        if (coe = dp[now][i][j]) {
          a = ksm(k - t + 1, i), b = ksm(t, n - i);
          for (int c = 0, ma = 1, mb = 1; c <= m - j; c++)
            Add(dp[nxt][i][j + c], mul(mul(ifc[c], coe), mul(ma, mb))),
                Mul(ma, a), Mul(mb, b);
        }
    swap(now, nxt), memset(dp[nxt], 0, sizeof(dp[nxt]));
    for (int i = 0; i <= n; i++)
      for (int j = 0, coe; j <= m; j++)
        if (coe = dp[now][i][j]) {
          a = dec(0, ksm(k - t, j)), b = ksm(t, m - j);
          for (int c = 0, ma = 1, mb = 1; c <= n - i; c++)
            Add(dp[nxt][i + c][j], mul(mul(ifc[c], coe), mul(ma, mb))),
                Mul(ma, a), Mul(mb, b);
        }
    swap(now, nxt), memset(dp[nxt], 0, sizeof(dp[nxt]));
    for (int i = 0; i <= n; i++)
      for (int j = 0, coe; j <= m; j++)
        if (coe = dp[now][i][j]) {
          a = dec(0, ksm(k - t, i)), b = ksm(t, n - i);
          for (int c = 0, ma = 1, mb = 1; c <= m - j; c++)
            Add(dp[nxt][i][j + c], mul(mul(ifc[c], coe), mul(ma, mb))),
                Mul(ma, a), Mul(mb, b);
        }
    swap(now, nxt), memset(dp[nxt], 0, sizeof(dp[nxt]));
  }
  cout << mul(mul(fc[n], fc[m]), dp[now][n][m]);
  return 0;
}
