#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, m, K;
int P;
long long C[N][N];
long long Pw[N][N * N];
void init(int n = 100) {
  for (int i = 0; i <= n; i++) {
    C[i][0] = 1;
    for (int j = 1; j <= i; j++) C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % P;
  }
  for (int i = 0; i <= n; i++) {
    Pw[i][0] = 1;
    for (int j = 1; j <= n * n; j++) Pw[i][j] = Pw[i][j - 1] * i % P;
  }
  return;
}
long long f[2][N][N];
int cur;
int main() {
  scanf("%d%d%d", &n, &m, &K);
  scanf("%d", &P);
  init();
  int cur = 0;
  f[0][0][0] = 1;
  for (int k = 1; k <= K; k++) {
    cur ^= 1;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++)
        for (int a = 0; i + a <= n; a++)
          f[cur][i + a][j] =
              (f[cur][i + a][j] + C[n - i][a] * Pw[k][a * (m - j)] % P *
                                      Pw[K - k + 1][a * j] % P *
                                      f[cur ^ 1][i][j] % P) %
              P;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) f[cur ^ 1][i][j] = 0;
    cur ^= 1;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++)
        for (int b = 0; j + b <= m; b++)
          f[cur][i][j + b] =
              (f[cur][i][j + b] + C[m - j][b] * Pw[k][b * (n - i)] % P *
                                      Pw[K - k + 1][b * i] % P *
                                      f[cur ^ 1][i][j] % P) %
              P;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) f[cur ^ 1][i][j] = 0;
    cur ^= 1;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++)
        for (int c = 0; i + c <= n; c++)
          if (c & 1)
            f[cur][i + c][j] =
                (f[cur][i + c][j] -
                 C[n - i][c] * Pw[k][c * (m - j)] % P * Pw[K - k][c * j] % P *
                     f[cur ^ 1][i][j] % P +
                 P) %
                P;
          else
            f[cur][i + c][j] =
                (f[cur][i + c][j] + C[n - i][c] * Pw[k][c * (m - j)] % P *
                                        Pw[K - k][c * j] % P *
                                        f[cur ^ 1][i][j] % P) %
                P;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) f[cur ^ 1][i][j] = 0;
    cur ^= 1;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++)
        for (int d = 0; j + d <= m; d++)
          if (d & 1)
            f[cur][i][j + d] =
                (f[cur][i][j + d] -
                 C[m - j][d] * Pw[k][d * (n - i)] % P * Pw[K - k][d * i] % P *
                     f[cur ^ 1][i][j] % P +
                 P) %
                P;
          else
            f[cur][i][j + d] =
                (f[cur][i][j + d] + C[m - j][d] * Pw[k][d * (n - i)] % P *
                                        Pw[K - k][d * i] % P *
                                        f[cur ^ 1][i][j] % P) %
                P;
    for (int i = 0; i <= n; i++)
      for (int j = 0; j <= m; j++) f[cur ^ 1][i][j] = 0;
  }
  printf("%lld", f[cur][n][m]);
  return 0;
}
