#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
inline int gi() {
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  int sum = 0;
  while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar();
  return sum;
}
int mod;
inline int add(int x, int y) { return x + y > mod ? x + y - mod : x + y; }
inline int sub(int x, int y) { return x < y ? x - y + mod : x - y; }
inline void inc(int &x, int y) {
  x += y;
  if (x >= mod) x -= mod;
}
inline void dec(int &x, int y) {
  x -= y;
  if (x < 0) x += mod;
}
int n, m, t;
int c[maxn][maxn], pw[maxn][maxn * maxn], f[2][maxn][maxn], tr[maxn][maxn];
void init() {
  for (int i = 0; i <= n; ++i)
    for (int j = c[i][0] = 1; j <= i; ++j)
      c[i][j] = add(c[i - 1][j - 1], c[i - 1][j]);
  for (int i = 0; i <= t; ++i)
    for (int j = pw[i][0] = 1; j <= n * m; ++j)
      pw[i][j] = (long long)pw[i][j - 1] * i % mod;
}
int main() {
  n = gi();
  m = gi();
  t = gi();
  mod = gi();
  if (n < m) swap(n, m);
  init();
  int cur = 0;
  f[0][0][0] = 1;
  for (int k = 1; k <= t; ++k) {
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int j = 0; j <= m; ++j)
      for (int i = 0; i <= n; ++i)
        tr[j][i] = (long long)pw[k][i * (m - j)] * pw[t - k + 1][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        if (f[cur ^ 1][i][j]) {
          for (int l = 0; l + i <= n; ++l)
            inc(f[cur][i + l][j], (long long)f[cur ^ 1][i][j] * c[i + l][i] %
                                      mod * tr[j][l] % mod);
        }
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        tr[i][j] = (long long)pw[k][j * (n - i)] * pw[t - k + 1][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        if (f[cur ^ 1][i][j]) {
          for (int l = 0; l + j <= m; ++l)
            inc(f[cur][i][j + l], (long long)f[cur ^ 1][i][j] * c[j + l][j] %
                                      mod * tr[i][l] % mod);
        }
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int j = 0; j <= m; ++j)
      for (int i = 0; i <= n; ++i)
        tr[j][i] = (long long)pw[k][i * (m - j)] * pw[t - k][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        if (f[cur ^ 1][i][j]) {
          for (int l = 0; l + i <= n; ++l)
            if (~l & 1)
              inc(f[cur][i + l][j], (long long)f[cur ^ 1][i][j] * c[i + l][i] %
                                        mod * tr[j][l] % mod);
            else
              dec(f[cur][i + l][j], (long long)f[cur ^ 1][i][j] * c[i + l][i] %
                                        mod * tr[j][l] % mod);
        }
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        tr[i][j] = (long long)pw[k][j * (n - i)] * pw[t - k][i * j] % mod;
    for (int i = 0; i <= n; ++i)
      for (int j = 0; j <= m; ++j)
        if (f[cur ^ 1][i][j]) {
          for (int l = 0; l + j <= m; ++l)
            if (~l & 1)
              inc(f[cur][i][j + l], (long long)f[cur ^ 1][i][j] * c[j + l][j] %
                                        mod * tr[i][l] % mod);
            else
              dec(f[cur][i][j + l], (long long)f[cur ^ 1][i][j] * c[j + l][j] %
                                        mod * tr[i][l] % mod);
        }
  }
  printf("%d\n", f[cur][n][m]);
  return 0;
}
