#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
const int N = 105;
int n, m, k, mod;
int Pow(int x, int y) {
  int ans = 1;
  for (; y; y >>= 1, x = (long long)x * x % mod)
    if (y & 1) ans = (long long)ans * x % mod;
  return ans;
}
void Add(int &x, int y) {
  if ((x += y) >= mod) x -= mod;
}
void Del(int &x, int y) {
  if ((x -= y) < 0) x += mod;
}
int Add(int x) { return x >= mod ? x - mod : x; }
int Del(int x) { return x < 0 ? x + mod : x; }
int Fac[N], Inv[N];
int pw[N][N * N];
void prework() {
  int n = N - 1;
  Fac[0] = 1;
  for (int i = (1); i <= (n); i++) Fac[i] = (long long)Fac[i - 1] * i % mod;
  Inv[n] = Pow(Fac[n], mod - 2);
  for (int i = (n); i >= (1); i--) Inv[i - 1] = (long long)Inv[i] * i % mod;
  for (int i = (0); i <= (n); i++) {
    pw[i][0] = 1;
    for (int j = (1); j <= (n * n); j++)
      pw[i][j] = (long long)pw[i][j - 1] * i % mod;
  }
}
int C(int n, int m) {
  if (m < 0 || m > n) return 0;
  return (long long)Fac[n] * Inv[m] % mod * Inv[n - m] % mod;
}
int dp[4][N][N][N];
int main() {
  n = read(), m = read(), k = read(), mod = read();
  prework();
  if (n < m) swap(n, m);
  memset(dp, 0, sizeof dp);
  dp[0][1][0][0] = 1;
  for (int i = (1); i <= (k); i++)
    for (int a = (0); a <= (n); a++)
      for (int b = (0); b <= (m); b++)
        for (int t = (0); t <= (3); t++) {
          int v = dp[t][i][a][b];
          if (!v) continue;
          int T = (t + 1) % 4;
          if (t == 0) {
            for (int j = (0); j <= (n - a); j++)
              Add(dp[T][i][a + j][b], (long long)v * Inv[j] % mod *
                                          pw[k - i + 1][b * j] % mod *
                                          pw[i][(m - b) * j] % mod);
          } else if (t == 1) {
            for (int j = (0); j <= (m - b); j++)
              Add(dp[T][i][a][b + j], (long long)v * Inv[j] % mod *
                                          pw[k - i + 1][a * j] % mod *
                                          pw[i][(n - a) * j] % mod);
          } else if (t == 2) {
            for (int j = (0); j <= (n - a); j++) {
              int tmp = (long long)v * Inv[j] % mod * pw[k - i][b * j] % mod *
                        pw[i][(m - b) * j] % mod;
              if (j & 1)
                Del(dp[T][i][a + j][b], tmp);
              else
                Add(dp[T][i][a + j][b], tmp);
            }
          } else if (t == 3) {
            for (int j = (0); j <= (m - b); j++) {
              int tmp = (long long)v * Inv[j] % mod * pw[k - i][a * j] % mod *
                        pw[i][(n - a) * j] % mod;
              if (j & 1)
                Del(dp[T][i + 1][a][b + j], tmp);
              else
                Add(dp[T][i + 1][a][b + j], tmp);
            }
          }
        }
  int ans = (long long)dp[0][k + 1][n][m] * Fac[n] % mod * Fac[m] % mod;
  cout << ans << endl;
  return 0;
}
