#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long f[105][105], c[105][105], MOD, pw[105][10005];
long long quick_pow(long long x, long long a) {
  long long ans = 1;
  while (a) {
    if (a & 1) ans = ans * x % MOD;
    x = x * x % MOD;
    a >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d%d%d%lld", &n, &m, &k, &MOD);
  for (int i = 1; i <= k; i++) {
    pw[i][0] = 1;
    for (int j = 1; j <= n * m; j++) pw[i][j] = pw[i][j - 1] * i % MOD;
  }
  c[0][0] = 1;
  for (int i = 0; i <= 100; i++)
    for (int j = 0; j <= 100; j++) {
      if (c[i][j] >= MOD) c[i][j] -= MOD;
      c[i + 1][j + 1] += c[i][j];
      c[i + 1][j] += c[i][j];
    }
  f[0][0] = 1;
  for (int i = 1; i <= k; i++) {
    for (int x = n; x >= 0; x--)
      for (int y = m; y >= 0; y--) {
        for (int j = 1; j <= x; j++) {
          f[x][y] =
              (f[x][y] + f[x - j][y] * c[n - x + j][j] % MOD *
                             pw[k - i + 1][j * y] % MOD * pw[i][j * (m - y)]) %
              MOD;
        }
      }
    for (int x = n; x >= 0; x--)
      for (int y = m; y >= 0; y--) {
        for (int j = 1; j <= y; j++) {
          f[x][y] =
              (f[x][y] + f[x][y - j] * c[m - y + j][j] % MOD *
                             pw[k - i + 1][j * x] % MOD * pw[i][j * (n - x)]) %
              MOD;
        }
      }
    for (int x = n; x >= 0; x--)
      for (int y = m; y >= 0; y--) {
        for (int j = 1; j <= x; j++) {
          if (j & 1)
            f[x][y] =
                (f[x][y] - f[x - j][y] * c[n - x + j][j] % MOD *
                               pw[k - i][j * y] % MOD * pw[i][j * (m - y)]) %
                MOD;
          else
            f[x][y] =
                (f[x][y] + f[x - j][y] * c[n - x + j][j] % MOD *
                               pw[k - i][j * y] % MOD * pw[i][j * (m - y)]) %
                MOD;
        }
      }
    for (int x = n; x >= 0; x--)
      for (int y = m; y >= 0; y--) {
        for (int j = 1; j <= y; j++) {
          if (j & 1)
            f[x][y] =
                (f[x][y] - f[x][y - j] * c[m - y + j][j] % MOD *
                               pw[k - i][j * x] % MOD * pw[i][j * (n - x)]) %
                MOD;
          else
            f[x][y] =
                (f[x][y] + f[x][y - j] * c[m - y + j][j] % MOD *
                               pw[k - i][j * x] % MOD * pw[i][j * (n - x)]) %
                MOD;
        }
      }
  }
  if (f[n][m] < 0) f[n][m] += MOD;
  printf("%lld\n", f[n][m]);
  return 0;
}
