#include <bits/stdc++.h>
using namespace std;
int H, W, K;
signed long long mo;
signed long long modpow(signed long long a, signed long long n = mo - 2) {
  signed long long r = 1;
  a %= mo;
  while (n) r = r * ((n % 2) ? a : 1) % mo, a = a * a % mo, n >>= 1;
  return r;
}
const int CN = 401;
signed long long C[CN][CN];
signed long long A[101][101][101];
signed long long B[101][101][101];
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> H >> W >> K >> mo;
  for (i = 0; i < (CN); i++)
    for (j = 0; j <= i; j++)
      C[i][j] = (j == 0 || j == i) ? 1 : (C[i - 1][j - 1] + C[i - 1][j]) % mo;
  A[0][0][0] = 1;
  for (k = 1; k <= K; k++) {
    for (y = 0; y < (H + 1); y++)
      for (x = 0; x < (W + 1); x++)
        if (A[k - 1][y][x]) {
          signed long long pat =
              (modpow(k, W - x) + mo - modpow(k - 1, W - x)) % mo;
          for (int len = 0; y + len <= H; len++) {
            (B[k - 1][y + len][x] += A[k - 1][y][x] * C[H - y][len] % mo *
                                     modpow(pat, len) % mo *
                                     modpow(K + 1 - k, len * x)) %= mo;
          }
        }
    for (y = 0; y < (H + 1); y++)
      for (x = 0; x < (W + 1); x++)
        if (B[k - 1][y][x]) {
          signed long long pat =
              (modpow(K + 1 - k, y) + mo - modpow(K - k, y)) % mo;
          for (int len = 0; x + len <= W; len++) {
            (A[k][y][x + len] += B[k - 1][y][x] * C[W - x][len] % mo *
                                 modpow(pat, len) % mo *
                                 modpow(k, len * (H - y))) %= mo;
          }
        }
  }
  cout << A[K][H][W] << endl;
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false), cin.tie(0);
  for (i = 0; i < (argc - 1); i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < (s.size()); i++) ungetc(s[s.size() - 1 - i], stdin);
  cout.tie(0);
  solve();
  return 0;
}
