#include <bits/stdc++.h>
using namespace std;
const int N = 300005, E = 524288;
int n, m, p, M;
int i, j, k;
long long dp[105][105][105][4], C[105][105], f[105][10005];
long long dfs(int a, int b, int c, int d) {
  if (a > p) {
    if (b == n && c == m) return 1;
    return 0;
  }
  if (dp[a][b][c][d] != -1) return dp[a][b][c][d];
  int i;
  long long s = 0;
  if (d == 0)
    for (i = 0; i + b <= n; ++i)
      s = (s + f[a][(m - c) * i] * C[n - b][i] % M * f[p - a + 1][c * i] % M *
                   dfs(a, b + i, c, d + 1)) %
          M;
  if (d == 1)
    for (i = 0; i + c <= m; ++i)
      s = (s + f[a][(n - b) * i] * C[m - c][i] % M * f[p - a + 1][b * i] % M *
                   dfs(a, b, c + i, d + 1)) %
          M;
  if (d == 2)
    for (i = 0; i + b <= n; ++i)
      s = (s + (i & 1 ? 1 : -1) * f[a][(m - c) * i] * C[n - b][i] % M *
                   f[p - a][c * i] % M * dfs(a, b + i, c, d + 1)) %
          M;
  if (d == 3)
    for (i = 0; i + c <= m; ++i)
      s = (s + (i & 1 ? 1 : -1) * f[a][(n - b) * i] * C[m - c][i] % M *
                   f[p - a][b * i] % M * dfs(a + 1, b, c + i, 0)) %
          M;
  return dp[a][b][c][d] = s;
}
int main() {
  scanf("%d %d %d %d", &n, &m, &p, &M);
  f[0][0] = 1;
  for (i = 1; i <= p; ++i) {
    f[i][0] = 1;
    for (j = 1; j <= n * m; ++j) f[i][j] = f[i][j - 1] * i % M;
  }
  for (i = 0; i <= 100; ++i) {
    C[i][0] = C[i][i] = 1;
    for (j = 1; j < i; ++j) C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % M;
  }
  memset(dp, -1, sizeof(dp));
  cout << (dfs(1, 0, 0, 0) % M + M) % M;
}
