#include <bits/stdc++.h>
using namespace std;
int MOD;
inline void update(int &x, long long y) { x = (x + y) % MOD; }
long long powd[105][10005], C[105][105];
void pre(int n, int m, int k) {
  for (int i = 0; i <= k; i++) {
    powd[i][0] = 1;
    for (int j = 1; j <= n * m; j++) powd[i][j] = powd[i][j - 1] * i % MOD;
  }
  for (int i = 0; i <= max(n, m); i++) C[i][0] = 1;
  for (int i = 1; i <= max(n, m); i++)
    for (int j = 1; j <= i; j++)
      C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
}
int f[2][105][105];
int main() {
  int n, m, K;
  scanf("%d%d%d%d", &n, &m, &K, &MOD);
  pre(n, m, K);
  int cur = 0;
  f[0][0][0] = 1;
  for (int i = 1; i <= K; i++) {
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int j = 0; j <= n; j++)
      for (int k = 0; k <= m; k++)
        for (int l = 0; l <= j; l++)
          update(f[cur][j][k], (long long)f[cur ^ 1][j - l][k] * C[j][l] % MOD *
                                   powd[i][l * (m - k)] % MOD *
                                   powd[K - i + 1][l * k]);
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int j = 0; j <= n; j++)
      for (int k = 0; k <= m; k++)
        for (int l = 0; l <= k; l++)
          update(f[cur][j][k], (long long)f[cur ^ 1][j][k - l] * C[k][l] % MOD *
                                   powd[i][l * (n - j)] % MOD *
                                   powd[K - i + 1][l * j]);
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int j = 0; j <= n; j++)
      for (int k = 0; k <= m; k++)
        for (int l = 0; l <= j; l++)
          update(f[cur][j][k], (long long)f[cur ^ 1][j - l][k] * C[j][l] % MOD *
                                   powd[i][l * (m - k)] % MOD *
                                   powd[K - i][l * k] % MOD *
                                   ((l & 1) ? MOD - 1 : 1));
    cur ^= 1;
    memset(f[cur], 0, sizeof(f[cur]));
    for (int j = 0; j <= n; j++)
      for (int k = 0; k <= m; k++)
        for (int l = 0; l <= k; l++)
          update(f[cur][j][k], (long long)f[cur ^ 1][j][k - l] * C[k][l] % MOD *
                                   powd[i][l * (n - j)] % MOD *
                                   powd[K - i][l * j] % MOD *
                                   ((l & 1) ? MOD - 1 : 1));
  }
  printf("%d\n", f[cur][n][m]);
  return 0;
}
