#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& p) {
  return o << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& vc) {
  o << "{";
  for (const T& v : vc) o << v << ",";
  o << "}";
  return o;
}
using ll = long long;
template <class T>
using V = vector<T>;
template <class T>
using VV = vector<vector<T>>;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
unsigned int mod = 1;
struct ModInt {
  using uint = unsigned int;
  using ll = long long;
  using ull = unsigned long long;
  uint v;
  ModInt() : v(0) {}
  ModInt(ll _v) : v(normS(_v % mod + mod)) {}
  explicit operator bool() const { return v != 0; }
  static uint normS(const uint& x) { return (x < mod) ? x : x - mod; }
  static ModInt make(const uint& x) {
    ModInt m;
    m.v = x;
    return m;
  }
  ModInt operator+(const ModInt& b) const { return make(normS(v + b.v)); }
  ModInt operator-(const ModInt& b) const { return make(normS(v + mod - b.v)); }
  ModInt operator-() const { return make(normS(mod - v)); }
  ModInt operator*(const ModInt& b) const { return make((ull)v * b.v % mod); }
  ModInt operator/(const ModInt& b) const { return *this * b.inv(); }
  ModInt& operator+=(const ModInt& b) { return *this = *this + b; }
  ModInt& operator-=(const ModInt& b) { return *this = *this - b; }
  ModInt& operator*=(const ModInt& b) { return *this = *this * b; }
  ModInt& operator/=(const ModInt& b) { return *this = *this / b; }
  ModInt& operator++(int) { return *this = *this + 1; }
  ModInt& operator--(int) { return *this = *this - 1; }
  ll extgcd(ll a, ll b, ll& x, ll& y) const {
    ll p[] = {a, 1, 0}, q[] = {b, 0, 1};
    while (*q) {
      ll t = *p / *q;
      for (int i = 0; i < (int)(3); i++) swap(p[i] -= t * q[i], q[i]);
    }
    if (p[0] < 0)
      for (int i = 0; i < (int)(3); i++) p[i] = -p[i];
    x = p[1], y = p[2];
    return p[0];
  }
  ModInt inv() const {
    ll x, y;
    extgcd(v, mod, x, y);
    return make(normS(x + mod));
  }
  ModInt pow(ll p) const {
    if (p < 0) return inv().pow(-p);
    ModInt a = 1;
    ModInt x = *this;
    while (p) {
      if (p & 1) a *= x;
      x *= x;
      p >>= 1;
    }
    return a;
  }
  bool operator==(const ModInt& b) const { return v == b.v; }
  bool operator!=(const ModInt& b) const { return v != b.v; }
  friend istream& operator>>(istream& o, ModInt& x) {
    ll tmp;
    o >> tmp;
    x = ModInt(tmp);
    return o;
  }
  friend ostream& operator<<(ostream& o, const ModInt& x) { return o << x.v; }
};
using mint = ModInt;
V<mint> fact, ifact;
mint Choose(int a, int b) {
  if (b < 0 || a < b) return 0;
  return fact[a] * ifact[b] * ifact[a - b];
}
void InitFact(int N) {
  fact.resize(N);
  ifact.resize(N);
  fact[0] = 1;
  for (int i = 1; i <= (int)(N - 1); i++) fact[i] = fact[i - 1] * i;
  ifact[N - 1] = fact[N - 1].inv();
  for (int i = N - 2; i >= 0; i--) ifact[i] = ifact[i + 1] * (i + 1);
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int H, W, K;
  cin >> H >> W >> K >> mod;
  InitFact(10000);
  mint dp[101][101][101] = {};
  mint dp2[101][101][101] = {};
  dp[0][0][0] = 1;
  for (int t = 0; t < (int)(K); t++) {
    for (int a = 0; a < (int)(H + 1); a++)
      for (int b = 0; b < (int)(W + 1); b++)
        if (dp[t][a][b]) {
          for (int i = 0; i < (int)(H - a + 1); i++)
            for (int j = 0; j < (int)(W - b + 1); j++) {
              dp2[t][a + i][b + j] +=
                  dp[t][a][b] * Choose(H - a, i) * Choose(W - b, j) *
                  mint(-1).pow(i + j) *
                  mint((K - t) * (t + 1)).pow((a + i) * (b + j) - a * b);
            }
        }
    for (int a = 0; a < (int)(H + 1); a++)
      for (int b = 0; b < (int)(W + 1); b++)
        if (dp2[t][a][b]) {
          for (int i = 0; i < (int)(H - a + 1); i++)
            for (int j = 0; j < (int)(W - b + 1); j++) {
              dp[t + 1][a + i][b + j] +=
                  dp2[t][a][b] * Choose(H - a, i) * Choose(W - b, j) *
                  mint((K - t - 1) * (t + 1)).pow((a + i) * (b + j) - a * b);
            }
        }
  }
  cout << dp[K][H][W] << endl;
}
