#include <bits/stdc++.h>
using namespace std;
const int N = 300005, E = 524288;
int n, m, p, M;
int i, j, k, a, b, c, d;
long long dp[4][105][105][105], C[105][105], f[105][10005];
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;
  }
  dp[0][p + 1][n][m] = 1;
  for (a = p; a >= 1; --a)
    for (b = n; b >= 0; --b)
      for (c = m; c >= 0; --c) {
        long long s = 0;
        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 * dp[0][a + 1][b][c + i]) %
              M;
        dp[3][a][b][c] = s;
        s = 0;
        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 * dp[3][a][b + i][c]) %
              M;
        dp[2][a][b][c] = s;
        s = 0;
        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 * dp[2][a][b][c + i]) %
              M;
        dp[1][a][b][c] = s;
        s = 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 * dp[1][a][b + i][c]) %
              M;
        dp[0][a][b][c] = s;
      }
  cout << (dp[0][1][0][0] % M + M) % M;
}
