#include <bits/stdc++.h>
using namespace std;
const int N = 110, M = 10010;
int n, m, K, P, T, nv, p[M], q[M], r[M], v[M], f[N][N], c[N][N];
void chk(int& x) {
  x -= P;
  x += (x >> 31) & P;
}
int qpw(int x, int y) {
  int z = 1;
  for (; y; y >>= 1, x = 1ll * x * x % P)
    if (y & 1) z = 1ll * z * x % P;
  return z;
}
void work(int x) {
  p[0] = q[0] = r[0] = v[0] = 1;
  nv = qpw(K - x + 1, P - 2);
  for (int i = 1; i <= T; i++)
    p[i] = 1ll * p[i - 1] * x % P, q[i] = 1ll * q[i - 1] * (x - 1) % P;
  for (int i = 1; i <= T; i++)
    r[i] = 1ll * r[i - 1] * (K - x + 1) % P, v[i] = 1ll * v[i - 1] * nv % P;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= m; j++)
      f[i][j] = 1ll * f[i][j] * r[(n - i) * (m - j)] % P;
  for (int i = n; i >= 0; i--)
    for (int j = m; j >= 0; j--)
      for (int k = 0; k <= i - 1; k++)
        chk(f[i][j] +=
            1ll * f[k][j] * c[n - k][i - k] % P * p[j * (i - k)] % P);
  for (int i = n; i >= 0; i--)
    for (int j = m; j >= 0; j--)
      for (int k = 0; k <= j - 1; k++)
        chk(f[i][j] +=
            1ll * f[i][k] * c[m - k][j - k] % P * p[i * (j - k)] % P);
  for (int i = n; i >= 0; i--)
    for (int j = m; j >= 0; j--)
      for (int k = 0; k <= i - 1; k++)
        chk(f[i][j] += 1ll * f[k][j] * c[n - k][i - k] % P * q[j * (i - k)] %
                       P * ((i - k) & 1 ? P - 1 : 1) % P);
  for (int i = n; i >= 0; i--)
    for (int j = m; j >= 0; j--)
      for (int k = 0; k <= j - 1; k++)
        chk(f[i][j] += 1ll * f[i][k] * c[m - k][j - k] % P * q[i * (j - k)] %
                       P * ((j - k) & 1 ? P - 1 : 1) % P);
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= m; j++)
      f[i][j] = 1ll * f[i][j] * v[(n - i) * (m - j)] % P;
}
int main() {
  scanf("%d%d%d%d", &n, &m, &K, &P);
  if (n < m) swap(n, m);
  T = n * m;
  for (int i = 0; i <= n; i++) c[i][0] = 1;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= i; j++) c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % P;
  f[0][0] = 1;
  for (int i = 1; i <= K; i++) work(K - i + 1);
  cout << f[n][m] << '\n';
}
