#include <bits/stdc++.h>
using namespace std;
long long inf;
const double eps = 1e-8;
const double pi = acos(-1.0);
template <class T, class T2>
long long chkmin(T &a, T2 b) {
  return a > b ? a = b, 1 : 0;
}
template <class T, class T2>
long long chkmax(T &a, T2 b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T, class T2>
T mmin(T a, T2 b) {
  return a < b ? a : b;
}
template <class T, class T2>
T mmax(T a, T2 b) {
  return a > b ? a : b;
}
template <class T>
T aabs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
long long dcmp(T a, T b) {
  return a > b;
}
template <long long *a>
long long cmp_a(long long first, long long second) {
  return a[first] < a[second];
}
struct __INIT__ {
  __INIT__() { memset(&inf, 0x3f, sizeof(inf)); }
} __INIT___;
namespace io {
const long long SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
long long f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char first) {
  *oS++ = first;
  if (oS == oT) flush();
}
template <typename A>
inline bool read(A &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
  return 1;
}
inline bool read(char &first) {
  while ((first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                               (iS == iT ? EOF : *iS++))
                            : *iS++)) == ' ' ||
         first == '\n' || first == '\r')
    ;
  return first != EOF;
}
inline bool read(char *first) {
  while ((*first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                                (iS == iT ? EOF : *iS++))
                             : *iS++)) == '\n' ||
         *first == ' ' || *first == '\r')
    ;
  if (*first == EOF) return 0;
  while (!(*first == '\n' || *first == ' ' || *first == '\r' || *first == EOF))
    *(++first) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                           : *iS++);
  *first = 0;
  return 1;
}
template <typename A, typename... B>
inline bool read(A &first, B &...second) {
  return read(first) && read(second...);
}
template <typename A>
inline bool write(A first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char first) {
  putc(first);
  return 0;
}
inline bool write(const char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
inline bool write(char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
template <typename A, typename... B>
inline bool write(A first, B... second) {
  return write(first) || write(second...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
long long n, m, k, p;
long long f[105][105];
long long inv[10005], fac[10005], invf[10005];
long long pw[105][10005], ipw[105][10005];
void calc(long long first, long long second, long long o, long long k) {
  long long nf = 0;
  for (long long i = 0; i <= first; ++i) {
    for (long long j = 0; j <= second; ++j) {
      long long w = 0;
      for (long long k = 0; k <= i; ++k)
        for (long long l = 0; l <= j; ++l) {
          w = (w +
               ((k + l) & 1 ? p - 1 : 1) *
                   pw[o]
                     [(first - k) * (second - l) - (first - i) * (second - j)] %
                   p * pw[o - 1][first * second - (first - k) * (second - l)] %
                   p * invf[k] % p * invf[i - k] % p * invf[l] % p *
                   invf[j - l]) %
              p;
        }
      nf = (nf + f[first - i][second - j] * w % p *
                     pw[k][(n - first + i) * (m - second + j)]) %
           p;
    }
  }
  f[first][second] = nf * ipw[k][(n - first) * (m - second)] % p;
}
void calc(long long k, long long o) {
  for (long long i = n; ~i; --i)
    for (long long j = m; ~j; --j) {
      f[i][j] = f[i][j] * pw[k][(n - i) * (m - j)] % p;
    }
  for (long long i = n; ~i; --i)
    for (long long j = m; ~j; --j) {
      long long s = 0;
      for (long long l = 0; l <= i; ++l) {
        s = (s + f[i - l][j] * pw[o][l * j] % p * invf[l]) % p;
      }
      f[i][j] = s;
    }
  for (long long i = n; ~i; --i)
    for (long long j = m; ~j; --j) {
      long long s = 0;
      for (long long l = 0; l <= j; ++l) {
        s = (s + f[i][j - l] * pw[o][l * i] % p * invf[l]) % p;
      }
      f[i][j] = s;
    }
  for (long long i = n; ~i; --i)
    for (long long j = m; ~j; --j) {
      long long s = 0;
      for (long long l = 0; l <= i; ++l) {
        s = (s + (l & 1 ? 1 : p - 1) * f[i - l][j] % p * pw[o - 1][l * j] % p *
                     invf[l]) %
            p;
      }
      f[i][j] = s;
    }
  for (long long i = n; ~i; --i)
    for (long long j = m; ~j; --j) {
      long long s = 0;
      for (long long l = 0; l <= j; ++l) {
        s = (s + (l & 1 ? 1 : p - 1) * f[i][j - l] % p * pw[o - 1][l * i] % p *
                     invf[l]) %
            p;
      }
      f[i][j] = s;
    }
  for (long long i = n; ~i; --i)
    for (long long j = m; ~j; --j) {
      f[i][j] = f[i][j] * ipw[k][(n - i) * (m - j)] % p;
    }
}
signed main() {
  read(n, m, k, p);
  long long s = mmax(n * m, k);
  f[0][0] = 1;
  fac[0] = fac[1] = inv[1] = invf[0] = invf[1] = 1;
  for (long long i = 2; i <= s; ++i) {
    fac[i] = fac[i - 1] * i % p;
    inv[i] = (p - p / i) * inv[p % i] % p;
    invf[i] = inv[i] * invf[i - 1] % p;
  }
  for (long long i = 0; i <= k; ++i) {
    pw[i][0] = 1;
    for (long long j = 1; j <= s; ++j) pw[i][j] = pw[i][j - 1] * i % p;
    ipw[i][0] = 1;
    for (long long j = 1; j <= s; ++j) ipw[i][j] = ipw[i][j - 1] * inv[i] % p;
  }
  f[0][0] = 1;
  for (long long i = 1; i <= k; ++i) {
    calc(i, k + 1 - i);
  }
  write(f[n][m] * fac[n] % p * fac[m] % p, '\n');
  return 0;
}
