#include<cstdio>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<vector>
#include<map>
#include<queue>
#include<cmath>
using namespace std;
#define N 6005
#define INF 0x3f3f3f3f
#define LL long long
int n,MOD,f[4][N*2];
int rd()
{
	int x=0,f=1;char c=getchar();
	while(c<'0'||c>'9'){if(c=='-')f=-1; c=getchar();}
	while(c>='0'&&c<='9'){x=(x<<3)+(x<<1)+(c^48);c=getchar();}
	return f*x;
}
int main()
{
	n=rd(),MOD=rd();
	f[0][N]=1;
	for(int i=1;i<=3*n;i++)
	{
		int l=N-(i-1),r=N+(i-1);
		for(int j=l;j<=r;j++)
		{
			for(int k=3;k>=1;k--)
				f[k][j]=f[k-1][j];
			f[0][j]=0;
		}
		for(int j=l;j<=r;j++)
		{
			f[0][j+1]=(f[0][j+1]+f[1][j])%MOD;
			int del=i-1;
			f[0][j-1]=(f[0][j-1]+1ll*f[2][j]*del%MOD)%MOD;
			del=1ll*(i-1)*(i-2)%MOD;
			f[0][j]=(f[0][j]+1ll*f[3][j]*del%MOD)%MOD;
		}
	}
	int ans=0;
	for(int i=N;i<=N+3*n;i++)
		ans=(ans+f[0][i])%MOD;
	printf("%d\n",ans);
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
const int MAX_FACT = 1e5 * 2 + 1;

ll fact[MAX_FACT], invFact[MAX_FACT], inv[MAX_FACT];

void init() {
  fact[0] = fact[1] = 1;
  invFact[0] = invFact[1] = 1;
  inv[1] = 1;
  for (auto i = 2; i < MAX_FACT; ++i)
  {
    fact[i] = fact[i - 1] * i % MOD;
    inv[i] = MOD - inv[MOD % i] * (MOD / i) % MOD;
    invFact[i] = invFact[i - 1] * inv[i] % MOD;
  }
}

ll calcCombination(ll n, ll k) {
  if (n < k) {
    return 0;
  }
  if (n < 0 || k < 0) {
    return 0;
  }
  return fact[n] * (invFact[k] * invFact[n - k] % MOD) % MOD;
}

int main()
{
  ll N, M, K;
  cin >> N >> M >> K;

  init();

  ll result = 0;
  for (int i = 1; i < N; i++) {
    result = (result + i * (N - i) * M % MOD * M % MOD) % MOD;
  }
  for (int i = 1; i < M; i++) {
    result = (result + i * (M - i) * N % MOD * N % MOD) % MOD;
  }
  result = result * calcCombination(N * M - 2, K - 2) % MOD;
  cout << result << endl;
  return 0;
}