#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int n, m, d, Mod;
int f[N][N][N], g[N][N][N];
int C[N][N], Pow[N][N * N];
int add(int a, int b) { return (a += b) >= Mod ? a - Mod : a; }
int sub(int a, int b) { return (a -= b) < 0 ? a + Mod : a; }
int mul(int a, int b) { return 1ll * a * b % Mod; }
int fast_pow(int a, int b) {
  int res = 1;
  for (; b; b >>= 1, a = mul(a, a)) {
    if (b & 1) res = mul(res, a);
  }
  return res;
}
void init() {
  for (int i = 0; i <= 100; i++) C[i][0] = 1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 1; j <= i; j++) {
      C[i][j] = add(C[i - 1][j], C[i - 1][j - 1]);
    }
  }
  for (int i = 1; i <= 100; i++) {
    Pow[i][0] = 1;
    for (int j = 1; j <= 10000; j++) {
      Pow[i][j] = mul(Pow[i][j - 1], i);
    }
  }
}
int main() {
  init();
  cin >> n >> m >> d >> Mod;
  f[0][0][0] = 1;
  for (int k = 1; k <= d; k++) {
  }
  return 0;
}
