#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, m, k, mo;
int inv[N], C[N][N];
int P[N][N * N], IP[N][N * N];
int f[N][N][N], g[N][N], h[N][N];
int main() {
  scanf("%d%d%d%d", &n, &m, &k, &mo);
  inv[0] = inv[1] = 1;
  for (int i = (int)(2); i <= (int)(N - 1); i++)
    inv[i] = 1ll * inv[mo % i] * (mo - mo / i) % mo;
  for (int i = (int)(0); i <= (int)(k); i++) P[i][0] = IP[i][0] = 1;
  for (int i = (int)(0); i <= (int)(k); i++)
    for (int j = (int)(1); j <= (int)(n * m); j++)
      P[i][j] = 1ll * P[i][j - 1] * i % mo;
  for (int i = (int)(0); i <= (int)(k); i++)
    for (int j = (int)(1); j <= (int)(n * m); j++)
      IP[i][j] = 1ll * IP[i][j - 1] * inv[i] % mo;
  for (int i = (int)(0); i <= (int)(N - 1); i++) C[i][0] = 1;
  for (int i = (int)(1); i <= (int)(N - 1); i++)
    for (int j = (int)(1); j <= (int)(i); j++)
      C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mo;
  f[0][0][0] = 1;
  for (int i = (int)(1); i <= (int)(::k); i++) {
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++)
        g[j][k] = 1ll * P[i][(n - j) * (m - k)] * f[i - 1][j][k] % mo;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++) h[j][k] = 0;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++)
        for (int jj = (int)(0); jj <= (int)(n - j); jj++)
          h[j + jj][k] = (h[j + jj][k] + 1ll * g[j][k] * C[j + jj][jj] % mo *
                                             P[::k - i + 1][jj * k]) %
                         mo;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++) g[j][k] = 0;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++)
        for (int kk = (int)(0); kk <= (int)(m - k); kk++)
          g[j][k + kk] = (g[j][k + kk] + 1ll * h[j][k] * C[k + kk][kk] % mo *
                                             P[::k - i + 1][j * kk]) %
                         mo;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++) h[j][k] = 0;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++)
        for (int jj = (int)(0); jj <= (int)(n - j); jj++)
          h[j + jj][k] = (h[j + jj][k] + 1ll * g[j][k] * C[j + jj][jj] % mo *
                                             P[::k - i][jj * k] % mo *
                                             (jj & 1 ? mo - 1 : 1)) %
                         mo;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++) g[j][k] = 0;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++)
        for (int kk = (int)(0); kk <= (int)(m - k); kk++)
          g[j][k + kk] = (g[j][k + kk] + 1ll * h[j][k] * C[k + kk][kk] % mo *
                                             P[::k - i][j * kk] % mo *
                                             (kk & 1 ? mo - 1 : 1)) %
                         mo;
    for (int j = (int)(0); j <= (int)(n); j++)
      for (int k = (int)(0); k <= (int)(m); k++)
        f[i][j][k] = 1ll * g[j][k] * IP[i][(n - j) * (m - k)] % mo;
  }
  printf("%d\n", f[k][n][m]);
}
