#include <bits/stdc++.h>

using namespace std;

#define si(a) scanf("%d",&a)
#define MAX 1005
#define MOD 1000000007

int mod_plus(int a,int b)
{
    return (a+b)%MOD;
}

int mod_mul(long long a,long long b)
{
    return (a*b)%MOD;
}

int bigmod(int a , int b)
{
    if ( b == 0 ) return 1 % MOD;
    long long x = bigmod ( a , b / 2) ;
    x = ( x * x ) % MOD;
    if ( b % 2 == 1 ) x = ( x * a );
    return x %MOD;
}

int dp[MAX][MAX];

int count_it(int n,int k)
{
    if(n<k)return 0;
    if(!n)return 1;
    if(!k)return 0;
    int &ret=dp[n][k];
    if(ret!=-1)return ret;
    return ret=mod_mul(k,mod_plus(count_it(n-1,k-1),count_it(n-1,k)));
}

int fact[1000005];

int ncr(int n,int r)
{
    if(n<r)return 0;
    return mod_mul(fact[n],bigmod(mod_mul(fact[r],fact[n-r]),MOD-2));
}

int main()
{
    //freopen("input.txt","r",stdin);
    memset(dp,-1,sizeof(dp));
    int n,m,i,j,ans=0,k;
    fact[0]=1;
    for(i=1;i<1000005;i++)fact[i]=mod_mul(fact[i-1],i);
    cin>>n>>m>>k;
    if(m==1){
        cout<<bigmod(k,n)<<endl;
        return 0;
    }
    for(i=1;i<=min(n,k);i++){
        for(j=0;j<=i;j++){
            int cnt=mod_mul(ncr(k,j),ncr(k-j,i-j));
            cnt=mod_mul(cnt,ncr(k-i,i-j));
            cnt=mod_mul(cnt,bigmod(j,m*n-2*n));
            cnt=mod_mul(cnt,mod_mul(count_it(n,i),count_it(n,i)));
            //cout<<i<<" "<<j<<" "<<cnt<<endl;
            ans=mod_plus(ans,cnt);
        }
    }
    cout<<ans<<endl;
    return 0;
}

//Div1 D Hewr
#include <iostream>
#include <cstring>
using namespace std;
#define fo(i,a,b) for (int i=a; i<=b; ++i)
#define fd(i,a,b) for (int i=a; i>=b; --i)
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define LL long long

const int mn=1000010,mm=2010,co=1000000007;

int fac[mn],rv[mn],mem[mm];
int n,m,k,Ans;

inline int pow(int a,int b){
	int ret=1;
	while (b){
		if (b&1) ret=(LL)ret*a%co;
		a=(LL)a*a%co,b>>=1;
	}
	return ret;
}

inline int C(int x,int y){
	return (LL)fac[x]*rv[y]%co*rv[x-y]%co;
}

inline int calc(int x){
	if (mem[x]!=-1) return mem[x];
	int &S=mem[x]=0,t=-1;
	fd (l,x,1) t=-t,S=((LL)pow(l,n)*C(x,l)*t+S)%co;
	S=(S+co)%co;
	return S;
}

int main(){
	cin>>n>>m>>k;
	if (m==1){
		cout<<pow(k,n)<<endl;
		return 0;
	}
	fac[0]=1,rv[0]=pow(fac[0],co-2);
	fo (i,1,max(n,k)) fac[i]=(LL)fac[i-1]*i%co,rv[i]=pow(fac[i],co-2);
	memset(mem,-1,sizeof(mem));
	fo (i,0,min(n,k)) fo (j,0,min(n,k)-i){
		if (i+j*2>k) break;
		int S=calc(i+j);
		int T=(LL)S*S%co*C(k,i)%co*C(k-i,j)%co*C(k-i-j,j)%co*pow(i,n*(m-2))%co;
		Ans=(Ans+T)%co;
	}
	cout<<Ans<<endl;
}

//#define MY_DEBUG

#include <set>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#pragma comment(linker, "/STACK:64000000")

using namespace std;

#ifdef MY_DEBUG
#include <fstream>
ifstream cin("input.txt");
ofstream cout("output.txt");
//ifstream cin("game.in");
//ofstream cout("game.out");
#else
#include <iostream>
#endif

const long double eps =  1e-6;
const long long inf = 1000000007;
const long long linf = (long long)1e18;
const long double pi = acos(-1.0);
const int prime = 53;

inline void finclude(){
#ifdef MY_DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    srand(time(NULL));
}

long long mod = 1000000007, osn = 100000000;
long long dl[1000];

inline void div(long long b){
    long long k = 0;
    for(int i = dl[0]; i > 0; --i){
        k = k * osn + dl[i];
        dl[i] = k / b;
        k %= b;
    }
    while(dl[0] > 1 && dl[dl[0]] == 0)
        --dl[0];
}

inline long long md(long long b){
    long long k = 0;
    for(int i = dl[0]; i > 0; --i){
        k = k * osn + dl[i];
        k %= b;
    }
    return k;
}

inline void mul(long long b){
    long long k = 0;
    for(int i = 1; i <= dl[0]; ++i){
        k += dl[i] * b;
        dl[i] = k % osn;
        k /= osn;
    }
    while(k > 0){
        dl[++dl[0]] = k % osn;
        k /= osn;
    }
}

long long cc[1002][1002] = {}, K;

long long C(long long n, long long k){
    dl[0] = dl[1] = 1;
    if (k > n)
        return 0;
    if (k < 0)
        return 0;
    if (cc[K - n][k] != 0)
        return cc[K - n][k];
    for(long long i = 1; i <= k; ++i){
        mul(n - i + 1);
        div(i);
    }
    return cc[K - n][k] = md(mod);
}

long long max(long long a, long long b){
    if (a > b)
        return a;
    return b;
}

int main(){
    long long n, m, k, ans = 0;
    cin >> n >> m >> k;
    K = k;
    if (m == 1){
        ans = 1;
        for(int i = 0; i < n; ++i)
            ans = (ans * k) % mod;
        cout << ans << '\n';
        return 0;
    }
    long long a[1002][1002] = {}, b[1002] = {};
    a[1][1] = 1;
    for(int i = 1; i < n; ++i){
        for(int j = 1; j <= i; ++j){
            a[i + 1][j] += a[i][j] * j;
            a[i + 1][j] %= mod;
            a[i + 1][j + 1] += a[i][j];
            a[i + 1][j + 1] %= mod;
        }
    }
    for(int i = 1; i <= n; ++i){
        b[i] = a[n][i];
        for(int j = 2; j <= i; ++j)
            b[i] = (b[i] * j) % mod;
    }
    long long st[1001][1001], s[1001];
    for(int i = 0; i <= 1000; ++i){
        st[i][0] = 1;
        for(int j = 1; j <= 1000; ++j)
            st[i][j] = (st[i][j - 1] * i) % mod;
        long long he = 1;
        for(int k = 2; k <= m - 1; ++k){
            he *= st[i][n];
            he %= mod;
        }
        s[i] = he;
    }
    long long he;
    for(int i = 0; i <= n && i <= k; ++i)
        C( max(k - n, 1), i);
    for(int i = max(k - n + 1, 2); i <= k; ++i){
        for(int j = 0; j <= n; ++j)
            cc[k - i][j] = (C(i - 1, j) + C(i - 1, j - 1)) % mod;
    }
    for(int i = 1; i <= n && i <= k; ++i){
        for(int j = 0; j <= i; ++j){
            he = b[i] * b[i];
            he %= mod;
            he *= C(k, j);
            he %= mod;
            he *= C(k - j, i - j);
            he %= mod;
            he *= C(k - i, i - j);
            he %= mod;
            he *= s[j];
            he %= mod;
            ans += he;
            ans %= mod;
        }
    }
    cout << ans << '\n';
    return 0;
}

# include <iostream>
# include <cstdlib>
# include <cstdio>
# define int long long

const int MOD = 1e9 + 7;
const int INF= 1e9 + 7;

using namespace std;
int factorial[11111 * 2 * 2 * 2 * 2 * 2 * 2 * 2 * 2 ],d[2222][2222];
    int n,m,k;
void initialiazition()
{
    factorial[0] = 1;
    for(int i = 1;i <= k;i ++)
        factorial[i] = (factorial[i - 1] * i) % MOD;
}
int binpow(int x, int y) {
   int res = 1;
   while(y) {
      if(y % 2)
         res = (res * 1LL * x) % INF;
      y /= 2;
      x = (x * 1LL * x) % INF;
   }
   return res % INF;
}

int c(int k,int i)
{
    return (factorial[k] * binpow((factorial[k - i] * factorial[i]) % MOD,MOD - 2)) % MOD;
}
main ()
{

    cin >> n >> m >> k;
    initialiazition();
    if(m == 1)
    {
        cout << binpow(k,n) % 1000000007;
        return 0;
    }
    d[0][0] = 1;
    for(int i = 1; i <= 2000; i++)
    for(int j = 1; j <= n; j++)
    d[i][j] = (d[i - 1][j] * j + d[i - 1][j - 1]) % MOD;
    int res = 0;
    for(int i = 1; i <= n; i++) {
      for(int j = 0; j <= i; j++)
        {
            if(i + i - j <= k) {
            int cur = c(k, j);
            cur = (cur * 1LL * c(k - j, i - j)) % INF;
            cur = (cur * 1LL * c(k - i, i - j)) % INF;
            cur = (cur * 1LL * d[n][i]) % INF;
            cur = (cur * 1LL * d[n][i]) % INF;
            cur = (cur * 1LL * factorial[i]) % INF;
            cur = (cur * 1LL * factorial[i]) % INF;
            cur = (cur * 1LL * binpow(j, (n * (m - 2)))) % INF;
            res = (res + cur) % INF;
         }
        }
    }
    cout << res << endl;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>

#define MOD 1000000007

// how many ways to set first and last column such that
// common set of colours is S with |S| = k? call it a[k]

// then result will be sum_k a[k]*C[K][k]*modexp(k,(m-2)*n)

// a[k] = sum_i C[K-k][i]*C[K-k-i][i]*b[k+i]*b[k+i]
// b[k] = S[n][k]

/*ll egcd(ll a, ll b, ll& x, ll& y)
{
    if (b == 0)
    {
        x = 1; y = 0;
        return a;
    }
    ll result = egcd(b, a%b, y, x);
    y -= x*(a/b);
    return result;
}

ll modinv(ll a)
{
    ll x, y;
    egcd(a, MOD, x, y);
    while (x < 0) x += MOD;
    return (x % MOD);
}*/

using namespace std;
typedef long long ll;

int n, m, k;
ll F[1000001], Finv[1000001], S[1001][1001];

ll modexp(int base, int expn)
{
    ll res = 1;
    for (int i = (1<<29); i >= 1; i >>= 1)
    {
        res *= res;
        res %= MOD;
        if (i & expn)
        {
            res *= base;
            res %= MOD;
        }
    }
    return res;
}

ll choose(int num, int den1, int den2 = 0)
{
    int den3 = num - den1 - den2;
    ll res = F[num];
    res *= Finv[den1];
    res %= MOD;
    res *= Finv[den2];
    res %= MOD;
    res *= Finv[den3];
    res %= MOD;
    return res;
}

int main()
{
    F[0] = Finv[0] = 1;
    for (int N = 1; N <= 1000000; ++N)
    {
        F[N] = (N * F[N-1]) % MOD;
        Finv[N] = modexp(F[N], MOD - 2);
    }

    S[0][0] = 1;
    for (int N = 1; N <= 1000; ++N) S[N][0] = S[0][N] = 0;
    for (int N = 1; N <= 1000; ++N)
        for (int K = 1; K <= 1000; ++K)
            S[N][K] = (K * (S[N-1][K-1] + S[N-1][K])) % MOD;

    cin >> n >> m >> k;
    int colMax = min(k, n);

    ll A[1001];
    for (int K = 0; K <= colMax; ++K)
    {
        A[K] = 0;
        for (int i = 0; K + i <= colMax; ++i)
        {
            ll add = choose(k-K, i, i);
            add *= (S[n][K+i]*S[n][K+i]) % MOD;
            A[K] += add;
            A[K] %= MOD;
        }
    }

    ll res = 0;
    if (m == 1)
        res = modexp(k, n);
    else for (int K = 0; K <= colMax; ++K)
    {
        res += ((A[K]*choose(k,K)) % MOD) * modexp(K, (m-2)*n);
        res %= MOD;
    }
    cout << res << endl;
}

#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <vector>
#include <string>
#include <iomanip>
#include <stack>
#include <map>
#include <bitset>
#include <deque>
#include <functional>
#include <queue>
#include <unordered_map>
using namespace std;

typedef long long ll;

#define all(v) v.begin(), v.end()
#define pb push_back
#define xx first
#define yy second

const int maxn = 1000 * 1000 + 100;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const int delta = 11057;

ll pw(ll a, ll b, ll c = mod){
	if (b == 0)return 1;
	ll ans = pw(a, b / 2, c);
	ans = (ans*ans) % c;
	if (b & 1)ans = (ans*a) % c;
	return ans;
}
ll n, m, k,dp[1001][1001],res;
struct combine{
	ll fact[maxn], inv[maxn];
	void load(){
		fact[0] = 1; inv[0] = 1;
		for (int i = 1; i < maxn; i++)fact[i] = (fact[i - 1] * i) % mod;
		for (int i = 1; i < maxn; i++)inv[i] = (inv[i - 1] * pw(i, mod - 2)) % mod;
	}
	ll get(ll n, ll k){
		if (n < k)return 0;
		return fact[n] * inv[k] % mod*inv[n - k] % mod;
	}
}comb;
int main()
{
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	comb.load();
	cin >> n >> m >> k;
	if (m == 1){
		cout << pw(k, n); exit(0);
	}
	dp[0][0] = 1;
	for (int i = 1; i <= n; i++){
		for (int j = 1; j <= i; j++){
			dp[i][j] = (dp[i - 1][j] * j%mod + dp[i - 1][j - 1]*j%mod)%mod ;
		}
	}
	for (int y = 0; y <= n; y++){
		for (int x = y; x <= n; x++){
			ll ans = comb.get(k, 2 * x - y)*comb.get(2 * x - y, x - y)%mod*comb.get(x, x - y)%mod*pw(y,n*(m-2))%mod*dp[n][x]%mod*dp[n][x]%mod;
			res += ans;
			res%=mod;
		}
	}
	cout << res;
	return 0;
}

#include <bits/stdc++.h>
#define mod 1000000007
using namespace std;
int dp[1005][1005],fac[1000005],inv[1000005];
inline int qpow(int a,int b)
{int res=1,tp=a;
while (b)
{if (b&1) res=1ll*res*tp%mod;
tp=1ll*tp*tp%mod;b>>=1;
}
return res;
}
inline int cal(int a,int b)
{return 1ll*(1ll*fac[a]*inv[b]%mod)*inv[a-b]%mod;}
int main (){
	int n,m,i,j,k,ans=0;
	scanf ("%d%d%d",&n,&m,&k);
	if (m==1)
	{printf ("%d\n",qpow(k,n));
	return 0;
	}
	fac[0]=1ll;
	for (i=1;i<=k;i++) fac[i]=1ll*fac[i-1]*i%mod;
	inv[k]=qpow(fac[k],mod-2);
	for (i=k-1;i>=0;i--) inv[i]=1ll*inv[i+1]*(i+1)%mod;
	dp[0][0]=1;
	for (i=1;i<=n;i++)
	{for (j=1;j<=i;j++)
	{dp[i][j]=1ll*j*dp[i-1][j]%mod;
	dp[i][j]+=dp[i-1][j-1];
	if (dp[i][j]>=mod) dp[i][j]-=mod;
	}
	}
	for (i=1;i<=n;i++) dp[n][i]=1ll*dp[n][i]*fac[i]%mod;
	for (i=1;i<=n;i++)
	{for (j=0;j<=i;j++)
	{int all=2*i-j,c1=i-j,c2=i-j;
	if (all>k) continue;
	int w1=1ll*cal(k,all)*cal(all,c1)%mod;
	w1=1ll*w1*cal(all-c1,c2)%mod;
	int mid=qpow(j,(m-2)*n);
	int tot=1ll*dp[n][i]*dp[n][i]%mod;
	tot=1ll*tot*w1%mod;
	tot=1ll*tot*mid%mod;
	ans+=tot;
	if (ans>=mod) ans-=mod;
	}
	}
	printf ("%d\n",ans);
	return 0;
}

#define  _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<map>
#include<cmath>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<stack>
#include<math.h>
#include<set>
#include<string>
#include<cstring>
#include<queue>
#include<complex>
#include<assert.h>
#include<math.h>
#include<memory.h>
#include <stdlib.h>
#include<sstream>
#include<cstdio>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define repi(i,a,n) for(int i=a;i<n;i++)

#define mp make_pair
#define pb push_back
#define fastIO ios::sync_with_stdio(false)
#define read freopen("in.in","r",stdin)
#define write freopen("out.out","w",stdout)
#define scf(xx) scanf("%d",&xx)
#define All(a) a.begin(), a.end()
#define LSOne(S) (S & (-S))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef long double ld;

#define X first
#define Y second
int dx[] = { 0, 0, 1, -1, -1, -1, 1, 1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };

pair<ll, pair<ll, ll> > extendedEuclid(ll a, ll b) {
	if (a == 0) return make_pair(b, make_pair(0, 1));
	pair<ll, pair<ll, ll> > p;
	p = extendedEuclid(b % a, a);
	return make_pair(p.first, make_pair(p.second.second - p.second.first*(b / a), p.second.first));
}

ll modInverse(ll a, ll m) {
	return (extendedEuclid(a, m).second.first + m) % m;
}

ll inverseMod(ll x, ll y, ll z){
	return ((x%z)*modInverse(y%z, z)) % z;
}

ll Bigmod(ll x, ll y, ll m) // computes (x^y)%m in O(log(y)) and without Overflow
{
	if (y == 0)
		return 1 % m;
	if (y % 2 == 0)
	{
		ll temp = Bigmod(x, y / 2, m);
		return (temp*temp) % m;
	}
	return (x%m * Bigmod(x, y - 1, m)) % m;
}

ll pre[1111], mod = 1e9 + 7, fact[1000010], c[1111][1111];
ll C(ll n, ll k){
	return inverseMod(fact[n], fact[k] * fact[n - k], mod);
}

int main(){
	//fastIO;
	//read; write;
	fact[0] = fact[1] = 1;
	repi(i, 2, 1000010)fact[i] = (fact[i - 1] * (ll)i) % mod;

	ll n, m, k;
	cin >> n >> m >> k;

	pre[1] = 1;
	for(ll i=2 ; i <= n ;i++){
		pre[i] = Bigmod(i, n, mod);
		for (int j = 1; j < i; j++){
			pre[i] -= (pre[j] * C(i, j)) % mod;
			pre[i] = (pre[i] + mod) % mod;
		}
	}

	if (m == 1) {
		cout << Bigmod(k, n, mod);
		return 0;
	}
	if (m == 2){
		ll res = 0;
		for (ll d = 1; d <= min(k, n); d++){
			ll t = (C(k, d)*C(k, d)) % mod;
			t *= (pre[d]* pre[d]) % mod;
			t %= mod;
			res += t;
			res %= mod;
		}
		cout << res << endl;
		return 0;
	}
	ll res = 0;
	for (ll d = 1; d <= min(k, n); d++){
		repi(sh, 1, d + 1){
			ll x = d + d - sh;
			if (x > k) continue;
			ll t = C(k, x);
			t *= C(x, d); t %= mod;
			t *= C(d, sh); t %= mod;
			t *= pre[d]; t %= mod;
			t *= pre[d]; t %= mod;
			t *= Bigmod(sh, n*(m - 2), mod); t %= mod;
			res += t; res %= mod;
		}
	}
	cout << res << endl;
	return 0;
}

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[1000005];
int n,m,k;

void init(){
    int i,j;
    fac[0]=1;
    for(i=1;i<1000005;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

lld Cal(int x,int y){
    lld tmp=fac[x]*Mul(fac[x-y]*fac[y]%mod,mod-2)%mod;
    return tmp;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1])%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }
        lld ans=0;
        if(m==1){
            printf("%I64d\n",Mul(k,n));
        }else{
            for(i=1;i<=n && i<=k;i++){//最左最右个有i
                for(j=(m!=2);j<=i;j++)//都有的j
                    if(k>=2*i-j){
                    lld tp=Cal(k,j)*Mul(j,n*(m-2))%mod;
                    lld tf=Cal(k-j,i-j)*Cal(k-i,i-j)%mod;
                    lld tg=((dp[n][i]*dp[n][i]%mod)*(fac[i]*fac[i]%mod))%mod;
                    ans=(ans+((tp*tf%mod)*tg%mod))%mod;
                }
            }
            printf("%I64d\n",ans);
        }

    }
    return 0;
}

//#include <bits/stdc++.h>
#include <stdio.h>
#include <iostream>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <algorithm>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <bitset>
#include <string>
using namespace std;
double esp=1e-11;
//#pragma comment(linker, "/STACK:1024000000,1024000000")
#define fi first
#define se second
#define all(a) (a).begin(),(a).end()
#define cle(a) while(!a.empty())a.pop()
#define mem(p) memset(p,0,sizeof(p))
#define memf(p) memset(p,0x3f,sizeof(p))
#define memn(p) memset(p,-1,sizeof(p))
#define mp(A, B) make_pair(A, B)
#define pb push_back
#define lson l , m , rt << 1
#define rson m + 1 , r , rt << 1 | 1
typedef long long int LL;
typedef long double LF;
const double PI = acos(-1.0);
const LL INF=0x3f3f3f3f3f3f3f3f;
const LL MOD = 1000000007ll;
const int maxn=1100000;
int inv[maxn],pin_inv[maxn],pin[maxn];
void initnv(int N){inv[1]=1;for(int x=2;x<=N;x++)inv[x]=(LL)(MOD-MOD/x)*inv[MOD%x]%MOD;}
void initpin_inv(int N){initnv(N);pin_inv[1]=pin_inv[0]=1;for(int x=2;x<=N;x++)pin_inv[x]=(LL)pin_inv[x-1]*inv[x]%MOD;}
void initCab(int N){initpin_inv(N);pin[1]=pin[0]=1;for(int x=2;x<=N;x++)pin[x]=(LL)pin[x-1]*x%MOD;}
int Cab(int n,int m){return (LL)pin[n]*pin_inv[m]%MOD*pin_inv[n-m]%MOD;}
LL f[1100];
LL mu(LL a,LL b)		//a����ע��
{
    LL ans=1;
    while(b)
    {
        if((b & 1)&&(ans*=a)>=MOD)
            ans%=MOD;
        b >>= 1;
        if((a*=a)>=MOD)
            a%=MOD;
    }
    return ans;
}
int main()
{
    //freopen("in.txt", "r", stdin);
    //freopen("A-large.in", "r", stdin);
    //freopen("A-large.out", "w", stdout);
    //map<long long int,int>ma;                 %I64d
    //vector<int>::iterator iter;
    //memset(m,0,sizeof(int));               for(iter=trtr[rt].begin();iter!=trtr[rt].end();iter++)
    //for(int x=1;x<=n;x++)
    //for(int y=1;y<=n;y++)
    //scanf("%d%d",&a,&b);
    //scanf("%d",&n);
    //printf("%d\n",ans);
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    initCab(maxn-1);
    if(m==1){printf("%I64d\n",mu(k,n));return 0;}
    f[1]=1;
    for(int x=2;x<=n;x++)
    {
        f[x]=mu(x,n);
        for(int y=1;y<x;y++)
            f[x]=(f[x]-Cab(x,y)*f[y])%MOD;
    }
    LL ans=0;
    for(int x=0;x<=n;x++)
        for(int y=0;y<=n&&x+y<=n&&x+2*y<=k;y++)
            ans=(ans+(LL)Cab(k,x)*Cab(k-x,y)%MOD*Cab(k-x-y,y)%MOD*mu(x,n*(m-2))%MOD*f[x+y]%MOD*f[x+y]%MOD)%MOD;
    ans=(ans+MOD)%MOD;
    printf("%I64d\n",ans);
    return 0;
}

#include <iostream>
#include <cmath>
#include <cstdio>
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <cstring>
#include <cstdlib>

using namespace std;

const long long MOD = 1000000007;

long long deg(long long x, int d) {
    if (d == 0) {
        return 1;
    }

    long long res = deg(x, d / 2);
    res = (res * res) % MOD;
    if (d % 2) {
        res = (res * x) % MOD;
    }
    return res;
}

long long inverse(long long x) {
    return deg(x, MOD - 2);
}

int main() {
    int n, m, k;
    cin >> n >> m >> k;

    vector< long long > fact(k + 1), tcaf(k + 1);
    fact[0] = tcaf[0] = 1;
    for (int i = 1; i <= k; ++i) {
        fact[i] = (fact[i - 1] * i) % MOD;
        tcaf[i] = inverse(fact[i]);
    }

    vector< vector< long long > > K(n + 1, vector< long long > (n + 1, 0));
    K[0][0] = 1;
    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= i; ++j) {
            K[i][j] = (j * K[i - 1][j] + j * K[i - 1][j - 1]) % MOD;
        }
    }

    long long ans = 0;
    if (m == 1) {
        ans = deg(k, n);
    } else
    for (int l = 1; l <= n && l <= k; ++l) {
        for (int p = 0; p <= l; ++p) {
            if (2 * l - p > k) {
                continue;
            }
            long long res = fact[k];
            res = (res * tcaf[l - p]) % MOD;
            res = (res * tcaf[l - p]) % MOD;
            res = (res * tcaf[p]) % MOD;
            res = (res * tcaf[k - (2 * l - p)]) % MOD;
            res = (res * deg(p, n * (m - 2))) % MOD;
            res = (res * K[n][l]) % MOD;
            res = (res * K[n][l]) % MOD;
            ans = (ans + res) % MOD;
        }
    }

    cout << ans << '\n';

    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
#include <vector>
#include <map>
#include <set>
#include <algorithm>

#define LL long long

using namespace std;

const int maxn=1010, mo=1000000007;
int n, m, k;
LL f[maxn][maxn], g[maxn], fac[1000010], rev[1000010], ans, tmp, sum;

LL C(int n, int m){
	LL ret=fac[n]*rev[m]%mo*rev[n-m]%mo;
	return ret;
}

LL power(LL p, int e){
	if (e==0) return 1;
	if (e==1) return p;
	LL ret=power(p, e/2);
	ret=ret*ret%mo;
	if (e&1) ret=ret*p%mo;
	return ret;
}

int main(){
	cin>>n>>m>>k;
	if (m==1){
		cout<<power(k, n)<<endl;
		return 0;
	}
	fac[0]=rev[0]=1; ans=0;
	for (int i=1; i<=k; i++) fac[i]=fac[i-1]*i%mo, rev[i]=power(fac[i], mo-2);
	f[0][0]=1;
	for (int i=1; i<=n; i++)
		for (int j=1; j<=min(i, k); j++)
			f[i][j]=(f[i-1][j-1]+f[i-1][j]*j)%mo;
	for (int i=1; i<=n; i++) g[i]=f[n][i]*fac[i]%mo;
	for (int i=1; i<=n; i++)
		for (int j=0; j<=i; j++){
			int total=i+i-j;
			if (total>k) continue;
			LL overall=C(k, total);
			LL ansmid=power(j, n*m-n-n);
			LL ansleft=g[i]*C(total, i)%mo;
			LL ansright=g[i]*C(i, j)%mo;
			ans=(ans+ansleft*ansright%mo*ansmid%mo*overall%mo)%mo;
		}
	cout<<ans<<endl;
}

#include <bits/stdc++.h>
#include<algorithm>
using namespace std;
#define f(i,a,b) for(ll i=a;i<b;i++)
#define f_(i,a,b) for(ll i=a;i>=b;i--)
#define ll long long
#define pb push_back
#define maxm(a,b) a=max(a,b);
#define minm(a,b) a=min(a,b);
const int N=1003,mod=1e9+7;
ll m,n,k,s[N][N],ans,x,y,fac[1000009],g,a;
ll xgcd(ll a, ll b, ll &x, ll &y){
	if(b==0){x=1;y=0;return a;}
	ll x1,y1,gcd=xgcd(b,a%b,x1,y1);
	x=y1;
	y=x1- (long long)(a/b)*y1;
	return gcd;
}
ll tarkib(ll r,ll n){
	ll ans=1;
	ans=fac[n];
	x=1,y=1,g=xgcd(fac[n-r],mod,x,y);
	ans=(ans*((x+mod)%mod))%mod;
	return ans;
}
ll entekhab(ll r,ll n){
	if(r==0)
		return 1;
	ll ans=1;
	ans=fac[n];
	x=1,y=1,g=xgcd(fac[r],mod,x,y);
	ans=(ans*((x+mod)%mod))%mod;
	x=1,y=1,g=xgcd(fac[n-r],mod,x,y);
	ans=((ans*((x+mod)%mod)))%mod;
	return ans;
}
ll tavan(ll x,ll y){
	ll p;
	if(y==0) return 1;
	if(y%2==0){
		p=tavan(x,y/2);
		return (p*p)%mod;
	}
	return (tavan(x,y-1)*x)%mod;
}
ll p(ll q,ll w){
	return (q*w)%mod;
}
int main(){
	cin>>n>>m>>k;
	if(m==1){cout<<tavan(k,n);return 0;}
	s[0][0]=1;fac[0]=1;
	f(i,1,1000001) fac[i]=(fac[i-1]*i)%mod;
	f(i,1,N){
		f(j,1,i+1)
			s[i][j]=(s[i-1][j-1]+(s[i-1][j]*j))%mod;
	}
	f(i,1,min(n,k)+1){
		f(j,max((ll)0,i*2-k),i+1){
			a=(s[n][i]*s[n][i])%mod;
			a=p(a,entekhab(i,k));
			a=p(a,entekhab(j,i));
			a=p(a,entekhab(i-j,k-i));
			a=p(a,fac[i]),a=p(a,fac[i]);
			a=p(a,tavan(j,(m-2)*n));
			ans=(ans+a)%mod;
		}
	}
	cout<<ans<<endl;
}

//In the name of Allah
//
//
//////////////////////
// Program:
// Written By Alireza Farhadi (LGM)
//////////////////////
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cctype>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <utility>
#include <vector>
#include <bitset>
#include <deque>
#include <iomanip>
#include <complex>
#include <fstream>
#include <sstream>
#include <map>
//#include <climits>
//#include <list>

using namespace std;

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

#define show(x) cerr<<((#x))<<" = "<<((x))<<" "<<endl
#define bit(a,b) (((a)>>(b))&1)
#define gcd __gcd
#define endl '\n'
#define bcnt(x) ((__builtin_popcount(x)))
#define sz(x) ((int((x).size())))
#define sqr(x) ((((x))*((x))))
#define fx(x) fixed<<setprecision(x)

template<class T> inline void smn(T &a,const T &b){if(b<a) a=b;}
template<class T> inline void smx(T &a,const T &b){if(b>a) a=b;}
template<class T> inline T rev(const T & a){T _=a; reverse(_.begin(),_.end()); return _;}

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pie;

const double eps=1e-9;
const ld leps=1e-14;
const int MN=1000*1000+100,MOD=1000*1000*1000+7;
int fac[MN],fll[MN],rfac[MN],pp[MN],pp2[MN];
inline int mul(const int & a,const int & b) { return ((ll(a)*b)%MOD); }
int pw(int a,int b)
{
	int s=1,q=a;
	while (b)
	{
		if (b%2) s=mul(s,q);
		b/=2;
		if (b) q=mul(q,q);
	}
	return s;
}
int c(int a,int b) { return mul(fac[a],mul(rfac[b],rfac[a-b]));}
int n,m,k,res;
int main()
{
	ios_base::sync_with_stdio(false);
	cin>>n>>m>>k;
	fac[0]=rfac[0]=1;
	for (int i=1;i<=k;i++) fac[i]=mul(fac[i-1],i),rfac[i]=pw(fac[i],MOD-2);
	for (int i=0;i<=n;i++) pp[i]=pw(i,n*(m-2)),pp2[i]=pw(i,n);
	for (int i=1;i<=n;i++)
	{
		for (int j=i,t=1;j>0;j--,t*=-1)
			fll[i]=(fll[i]+t*mul(c(i,j),pp2[j]))%MOD;
		fll[i]=mul(fll[i],fll[i]);
	}
	if (m==1) res=pw(k,n);
	else
		for (int i=0;i<=n;i++) for (int j=0;i+j<=n && 2*i+j<=k;j++) if (i+j>0)
		{
			res+=mul(mul(mul(mul(c(k,j),c(k-j,i)),c(k-j-i,i)),fll[i+j]),pp[j]);
			if (res>=MOD) res-=MOD;
		}
	cout<<res<<endl;
	return 0;
}

//In the name of Allah
//
//
//////////////////////
// Program:
// Written By Alireza Farhadi (LGM)
//////////////////////
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cctype>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <utility>
#include <vector>
#include <bitset>
#include <deque>
#include <iomanip>
#include <complex>
#include <fstream>
#include <sstream>
#include <map>
//#include <climits>
//#include <list>

using namespace std;

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

#define show(x) cerr<<((#x))<<" = "<<((x))<<" "<<endl
#define bit(a,b) (((a)>>(b))&1)
#define gcd __gcd
#define endl '\n'
#define bcnt(x) ((__builtin_popcount(x)))
#define sz(x) ((int((x).size())))
#define sqr(x) ((((x))*((x))))
#define fx(x) fixed<<setprecision(x)

template<class T> inline void smn(T &a,const T &b){if(b<a) a=b;}
template<class T> inline void smx(T &a,const T &b){if(b>a) a=b;}
template<class T> inline T rev(const T & a){T _=a; reverse(_.begin(),_.end()); return _;}

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pie;

const double eps=1e-9;
const ld leps=1e-14;
const int MN=1000*1000+100,MOD=1000*1000*1000+7;
int fac[MN],fll[MN],rfac[MN],pp[MN];
inline int mul(const int & a,const int & b) { return ((ll(a)*b)%MOD); }
int pw(int a,int b)
{
	int s=1,q=a;
	while (b)
	{
		if (b%2) s=mul(s,q);
		b/=2;
		if (b) q=mul(q,q);
	}
	return s;
}
int c(int a,int b) { return mul(fac[a],mul(rfac[b],rfac[a-b]));}
int n,m,k,res;
int main()
{
	ios_base::sync_with_stdio(false);
	cin>>n>>m>>k;
	fac[0]=rfac[0]=1;
	for (int i=1;i<=k;i++) fac[i]=mul(fac[i-1],i),rfac[i]=pw(fac[i],MOD-2);
	for (int i=0;i<=n;i++) pp[i]=pw(i,n*(m-2));
	for (int i=1;i<=n;i++)
	{
		for (int j=i,t=1;j>0;j--,t*=-1)
			fll[i]=(fll[i]+t*mul(c(i,j),pw(j,n)))%MOD;
		fll[i]=mul(fll[i],fll[i]);
	}
	if (m==1) res=pw(k,n);
	else
		for (int i=0;i<=n;i++) for (int j=0;i+j<=n && 2*i+j<=k;j++) if (i+j>0)
		{
			res+=mul(mul(mul(mul(c(k,j),c(k-j,i)),c(k-j-i,i)),fll[i+j]),pp[j]);
			if (res>=MOD) res-=MOD;
		}
	cout<<res<<endl;
	return 0;
}

#include<cstdio>
typedef unsigned ui;
typedef unsigned long long ull;
const ui H=1000000007, N=1000,K=1000010;
ui f[K];
ui pow(ui a,ui m){
	ull ret =1,w=a;
	for( ;m;m>>=1,w*=w,w%=H)
		if(m&1)ret*=w,ret%=H;
	return ui(ret);
}
ull C(ui a,ui b){
	return ull(f[a])*pow(f[a-b],H-2)%H*pow(f[b],H-2)%H;
}
ui solve(){
	ui n,m,k,i,j,p[N];
	ull a=0,t;
	scanf("%d%d%d",&n,&m,&k);
	if(m==1)return pow(k,n);f[0]=1;
	for(i=1;i<=k;++i)f[i]=ui(ull(f[i-1])*i%H);
	p[0]=0;
	for(i=1;i<=n;++i){
		p[i]=pow(i,n);
		for(j=1;j<i;++j){
			p[i]+=ui(H-p[j]*C(i,j)%H);
			if(p[i]>=H)p[i]-=H;
		}
	}
	for(i=1;i<=n;++i)p[i]=ui(ull(p[i])*p[i] %H);
	for(i=0;i<=n && i<=k;++i){
		t=0;
		for(j=0;j+i<=n && i+j*2<=k;++j)
			t+=p[i+j]*C(k,i)%H*C(k-i,j)%H*C(k-i-j,j)%H;
		a+=t%H*pow(i,n*(m-2))%H;
	}
	return ui(a%H);
}
int main(){
	return printf("%d\n",solve()),0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <cmath>

using namespace std;

typedef unsigned long long ull;

template <class T> T sqr(T a) {
    return a*a;
}

const long long MODUL=1000000007;

const int MAXN=2111,MAX_K=1000005;

long long f[MAXN][MAXN];
long long fact[MAX_K],invFact[MAX_K];
bool met[MAXN][MAXN];

long long calcF(int n, int k) {
    if (n<=0 || k<=0) return 0;
    if (met[n][k]) {
        return f[n][k];
    }
    met[n][k]=true;
    f[n][k]=(calcF(n-1,k-1)+k*calcF(n-1,k))%MODUL;
    return f[n][k];
}

long long myBinPow(long long a, long long x) {
    if (x==0) return 1;
    if (x%2==0) return sqr(myBinPow(a,x/2))%MODUL;
    return (myBinPow(a,x-1)*a)%MODUL;
}

void calcFact() {
    fact[0]=invFact[0]=1;
    for (long long i=1;i<MAX_K;i++) {
        fact[i]=(fact[i-1]*i)%MODUL;
        invFact[i]=myBinPow(fact[i],MODUL-2);
    }
}

long long C(int n, int k) {
    if (k<0 || k>n) return 0;
    return (((fact[n]*invFact[k])%MODUL)*invFact[n-k])%MODUL;
}

long long factorial(int n) {
    return fact[n];
}

int n,m,k,nn,kk;

long long ans=0;

int main()
{
    //freopen("in.in","r",stdin);
    //freopen("out.out","w",stdout);

    cin >> n >> m >> k;

    met[1][1]=true;
    f[1][1]=1;
    nn=min(n,k);
    calcFact();
    if (m==1) {
        ans=myBinPow(k,n);
    }
    else {
        int x,y;
        for (y=0;y<=n;y++) {
            long long tmp=myBinPow(y,n*(m-2));
            for (x=y;x<=n;x++) {
                long long t=C(k,2*x-y);
                if (t==0) continue;
                t*=C(2*x-y,x-y);
                t%=MODUL;
                t*=C(x,x-y);
                t%=MODUL;
                t*=(sqr((factorial(x)*calcF(n,x))%MODUL))%MODUL;
                t%=MODUL;
                t*=tmp;
                t%=MODUL;
                ans+=t;ans%=MODUL;
            }
        }
    }

    cout << ans;
    return 0;
}

#include <bits/stdc++.h>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/assoc_container.hpp>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>
#define ll long long
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

// less_equal if supports multiple items
typedef tree<long long, null_type, less<long long>, rb_tree_tag,
             tree_order_statistics_node_update>
    dataSet;
const long long MOD = 1000000007;
const long long M = 1000050;
long long ans = 0;
long long n, m, a, d, mc,k ;
long long f[1500];
long long factor[M];

long long inv(long long x){
  long long y=MOD-2, res=1;
  for (; y; y>>=1,x=x*x%MOD) if (y&1) res=res*x%MOD;
  return res;
}

long long C(long long n,long long m){//求组合数
    return factor[n] * inv(factor[m]) % MOD* inv(factor[n - m]) % MOD;
}

long long fastPow(long long A,long long n) {
    A = A % MOD;
    long long ans=1;
    while(n > 0) {
        if(n&1) {
          ans=(ans*A)%MOD;
        }
        A=(A*A)%MOD;
        n>>=1;
    }
    return ans;
}

int main ( )
{
    factor[0] = 1;
    for (int i = 1; i < M; i++) {
        factor[i] = factor[i-1] * i % MOD;
    }
    memset(f, 0, sizeof(f));
    cin >> n>>m>>k;
    mc = min(n, k);
    f[1] = 1;
    for (long long i = 2;  i <= mc; i++) {
        f[i] = fastPow(i, n);
        for (long long j = 1; j < i; j++ ) {
            f[i] = (f[i] - (C(i, j) * f[j] % MOD) + MOD) % MOD;
            //printf("f[%lld]:-- %lld -- (%lld %lld) \n",i,f[i], C(i,j), f[j]);
        }
        //printf("f[%lld]: %lld\n",i,f[i]);
    }
    if (m == 1) {
        ans = fastPow(k, n);
    } else if (m == 2){
        for (long long total = 1; total <= mc; total ++) {
            ans = (ans + fastPow(C(k, total)*f[total], 2)) % MOD;
        }
    } else {
        for (long long total = 1; total <= mc; total++) {
            for (long long same = 1; same <= total; same++) {
                long long unique = total - same;
                if (k - same >= unique * 2) {
                    long long pos = C(k, same) * C(k-same, unique) % MOD;
                    pos = pos * C(k-same-unique, unique) % MOD;
                    pos = pos * fastPow(f[total],2) % MOD;
                    pos = pos * fastPow(same, (m-2)*n) % MOD;
                    //printf("%lld %lld: %lld\n", same,unique,  pos);
                    ans = (ans + pos) % MOD;
                }
            }
        }
    }
    cout << ans;

    return 0;
}

#include <cassert>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define all(x) (x).begin(), (x).end()
#define range(i, n) for (int i=0; i<(n); ++i)
#ifdef ONLINE_JUDGE
#define logging(x)
#else
#define logging(x) cerr << #x":" << x << endl
#endif
using namespace std;
int d4[4][2] = {{1,0}, {0,1}, {-1,0}, {0,-1}};
template<class T> void keep_max(T& a, const T& b) { if (a < b) a = b; }
template<class T> void keep_min(T& a, const T& b) { if (a > b) a = b; }
template<class T> void usort(vector<T>& a) { sort(all(a)); a.erase(unique(all(a))); }
//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_//\\_

const int MOD = 1000000000 + 7;

long long pow(long long n, long long k, long long mod) {
	long long r = 1;
	n %= mod;
	while (k > 0) {
		if (k & 1) r = r * n % mod;
		if (k > 1) n = n * n % mod;
		k /= 2;
	}
	return r;
}

long long inverse(long long a, long long mod) {
	long long b = mod, u = 1, v = 0;
	while (b) {
		long long t = a / b;
		swap(a -= t * b, b);
		swap(u -= t * v, v);
	}
	return (u % mod + mod) % mod;
}

long long jc[1000000+1];

int c(int n, int m) {
	return jc[n] * inverse(jc[m], MOD) % MOD * inverse(jc[n-m], MOD) % MOD;
}

int main() {
	int n, m, k;
	cin >> n >> m >> k;

	if (m == 1) {
		cout << pow(k, n, MOD);
		return 0;
	}

	jc[0] = 1;
	for (int i = 1; i <= 1000000; ++i) {
		jc[i] = jc[i-1] * i % MOD;
	}

	long long f[1001][1001];
	long long ans = 0;

	for (int i = 1; i <= n; ++i) {
		f[i][1] = 1;
		for (int j = 2; j <= i; ++j) {
			f[i][j] = (f[i-1][j] + f[i-1][j-1]) * j % MOD;
		}
	}

	if (m == 2) {
		for (int i = 1; i <= min(k, n); ++i) {
			logging(f[n][i]);
			long long cur = c(k, i) * f[n][i] % MOD;
			ans += cur * cur % MOD;
		}
	} else {
		for (int i = 1; i <= min(n, k); ++i) {
			long long mid = pow(i, n*(m-2), MOD);
			for (int j = 0; j <= min(k-i, n-i); ++j) {
				if (k - i - j < j) continue;
				long long cur = f[n][i+j] * f[n][i+j] % MOD * c(k,i) % MOD * c(k-i,j) % MOD * c(k-i-j,j) % MOD;
				ans += cur * mid % MOD;
			}
		}
	}
	cout << ans % MOD;

	return 0;
}

// khodaya khodet komak kon
#include <bits/stdc++.h>
#define pb push_back
#define ers erase
#define ins insert
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define debug(x)  cerr << #x << " = " << x << endl
#define kill(x) return cout << x, 0;
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#pragma GCC optimize ("Ofast")
using namespace std;

typedef long long ll;
typedef long double ld;
typedef string str;
typedef pair<ll, ll> pll;
typedef vector<ll> vl;
typedef vector<pll> vpl;

const ld Pi = 3.14159265359;
const ll MOD = 1000 * 1000 * 1000 + 7;
const ll N = 1e6 + 10;
const ll INF = 1e18;
const ll LOG = 20;
ll n, m, k;

ll ans = 0;

ll POW(ll x, ll t){
	if (t == 0) return 1;
	if (t % 2 == 0){
		return (POW((x * x) % MOD, t / 2));
	}else{
		return ((x * POW(x, t - 1)) % MOD);
	}
}
ll fac[N], im[N];

ll choose(ll x, ll y){
	if (y > x) return 0;
	if (x < 0) return 0;
	if (y == x || y == 0) return 1;
	return (((fac[x] * im[y]) % MOD) * im[x - y]) % MOD;
}
ll dp[1010][1010];

int main(){
	IOS;
	cin >> n >> m >> k;
	fac[0] = 1;
	for (int i = 1; i < N; i++) fac[i] = (fac[i - 1] * i) % MOD;
	for (int i = 0; i < N; i++){
		im[i] = POW(fac[i], MOD - 2);
	}
	if (m == 1) kill(POW(k, n));
	dp[1][1] = 1;
	for (int i = 2; i <= n; i++){
		dp[i][1] = 1;
		for (int j = 2; j <= i; j++){
			dp[i][j] =  j * dp[i - 1][j] + dp[i - 1][j - 1];
			dp[i][j] %= MOD;
		}
	}
	for (int i = 1; i <= min(n, k); i++){
		for (int j = 0; j <= i; j++){
			ll sum = (dp[n][i] * dp[n][i]) % MOD;
			sum %= MOD;
			sum *= (fac[i] * fac[i]) % MOD;
			sum %= MOD;
			sum *= POW(j, n * (m - 2));
			sum %= MOD;
			sum *= choose(k, 2 * i - j);
			sum %= MOD;
			sum *= choose(2 * i - j, i - j);
			sum %= MOD;
			sum *= choose(i, i - j);
			sum %= MOD;
			//cout << i << ' ' << j << ' ' << sum << '\n';
			ans += sum;
			ans %= MOD;
		}
	}
	cout << ans;

}

/*
     ,---,           ___                 ,--,
    '  .' \        ,--.'|_             ,--.'|                             ,--,
   /  ;    '.      |  | :,'            |  | :                           ,--.'|    ,---.        ,---,
  :  :       \     :  : ' :            :  : '                 .--.--.   |  |,    '   ,'\   ,-+-. /  |
  :  |   /\   \  .;__,'  /    ,--.--.  |  ' |     ,--.--.    /  /    '  `--'_   /   /   | ,--.'|'   |
  |  :  ' ;.   : |  |   |    /       \ '  | |    /       \  |  :  /`./  ,' ,'| .   ; ,. :|   |  ,"' |
  |  |  ;/  \   \:__,'| :   .--.  .-. ||  | :   .--.  .-. | |  :  ;_    '  | | '   | |: :|   | /  | |
  '  :  | \  \ ,'  '  : |__  \__\/: . .'  : |__  \__\/: . .  \  \    `. |  | : '   | .; :|   | |  | |
  |  |  '  '--'    |  | '.'| ," .--.; ||  | '.'| ," .--.; |   `----.   \'  : |_|   :    ||   | |  |/
  |  :  :          ;  :    ;/  /  ,.  |;  :    ;/  /  ,.  |  /  /`--'  /|  | '.'\   \  / |   | |--'
  |  | ,'          |  ,   /;  :   .'   \  ,   /;  :   .'   \'--'.     / ;  :    ;`----'  |   |/
  `--''             ---`-' |  ,     .-./---`-' |  ,     .-./  `--'---'  |  ,   /         '---'
                            `--`---'            `--`---'                 ---`-'
*/

//#include<khoda>
#include<bits/stdc++.h>

#define F first
#define S second
#define int ll

using namespace std;
typedef long long ll;
typedef long double ld;
const int N = 2e3 + 5 , inf = 1e18 , mod = 1e9 + 7;

ll n , m , k , dp[N][N] , ans , fact[N*N] , inv[N*N];

ll C( int x , int y )
{
    if ( x > y )
        return 0;
    return ( ( ( fact[y] * inv[x] ) % mod ) * inv[y-x] ) % mod;
}

ll spow( int a , int b )
{
    if ( b == 0 )
        return 1;
    ll c = spow( a , b/2 );
    c = c * c;
    c %= mod;
    if ( b & 1 )
        c *= a;
    return (c%mod);
}

void calc( int x , int y )
{
    ll res = 1;
    res *= C( 2*x-y , k );          res %= mod;
    res *= C( x-y , 2*x-y );        res %= mod;
    res *= C( x-y , x );            res %= mod;
    res *= dp[n][x];                res %= mod;
    res *= dp[n][x];                res %= mod;
    res *= fact[x];                 res %= mod;
    res *= fact[x];                 res %= mod;
    res *= spow( y , n*(m-2)  );    res %= mod;
    ans += res;                     ans %= mod;
}

int32_t main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    fact[0] = 1;
    for ( int i = 1 ; i < N*N ; i++ )
        fact[i] = ( fact[i-1] * i ) % mod;
    inv[N*N-1] = spow( fact[N*N-1] , mod-2 );
    for ( int i = N*N-2 ; i >= 0 ; i-- )
        inv[i] = ( inv[i+1] * (i+1) ) % mod;
    cin >> n >> m >> k;
    if ( m == 1 )
        return cout << spow( k , n ) , 0;
    dp[0][0] = 1;
    for ( int i = 1 ; i <= n ; i++ )
        for ( int j = 1 ; j <= n ; j++ )
            dp[i][j] = ( dp[i-1][j] * j + dp[i-1][j-1] ) % mod;
    for ( int i = 1 ; i <= n ; i++ )
        for ( int j = 0 ; j <= i ; j++ )
            if ( 2*i-j <= k )
                calc( i , j );
    cout << ans;
    return 0;
}

#include <cstdio>
#include <algorithm>

using namespace std;

long long extGcd(long long a, long long b, long long& x, long long& y) {
	if (b == 0) {
		x = 1;
		y = 0;
		return a;
	} else {
		int g = extGcd(b, a % b, y, x);
		y -= a / b * x;
		return g;
	}
}

long long modInv(long long a, long long m) {
	long long x, y;
	extGcd(a, m, x, y);
	x %= m;
	while (x < 0) {
		x += m;
	}
	return x;
}

const int MAXN = 1024;
const long long MOD = 1000000007LL;

long long r[MAXN], f[MAXN], c[MAXN][MAXN];

void init() {
	for (int i = 0; i < MAXN; ++i) {
		r[i] = i == 0 ? 0LL : modInv(i, MOD);
		f[i] = i == 0 ? 1LL : f[i - 1] * i % MOD;
		c[i][0] = c[i][i] = 1LL;
		for (int j = 1; j < i; ++j) {
			c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
		}
	}
}

long long choose(int n, int m) {
	if (n < m) {
		return 0;
	}
	long long ret = 1;
	for (int i = 0; i < m; ++i) {
		ret = ret * (n - i) % MOD;
		ret = ret * r[i + 1] % MOD;
	}
	return ret;
}

long long power(long long a, long long b) {
	long long c = 1;
	while (b > 0) {
		if (b & 1) {
			c = c * a % MOD;
		}
		b >>= 1;
		a = a * a % MOD;
	}
	return c;
}

long long ch[MAXN][MAXN];

int main() {
	int n, m, k;
	long long dp[MAXN], tmp, ans;

	init();
	scanf("%d%d%d", &n, &m, &k);
	fill(dp, dp + MAXN, 0);
	dp[0] = 1LL;
	for (int i = 1; i <= n; ++i) {
		for (int j = i; j >= 0; --j) {
			dp[j] = (j * dp[j] + (j > 0 ? dp[j - 1] : 0)) % MOD;
		}
	}

	ans = 0;

	if (m == 1) {
		ans = power(k, n);
	} else {
		fill(ch[0], ch[MAXN], 0);
		for (int i = 0; i <= n; ++i) {	// k - i
			for (int j = 0; j <= n && j <= n; ++j) {	// j
				if (j > k - i) {
					ch[i][j] = 0;
				} else if (j == 0) {
					ch[i][j] = 1;
				} else {
					ch[i][j] = ch[i][j - 1];
					ch[i][j] = ch[i][j] * (k - i + 1 - j) % MOD;
					ch[i][j] = ch[i][j] * r[j] % MOD;
				}
			}
		}
		for (int same = 0; same <= n && same <= k; ++same) {
			for (int diff = 0; same + diff <= n && same + diff <= k; ++diff) {
				tmp = 1LL;
				tmp = tmp * ch[0][same] % MOD;
				tmp = tmp * ch[same][diff] % MOD;
				tmp = tmp * ch[same + diff][diff] % MOD;
				tmp = tmp * f[same + diff] % MOD;
				tmp = tmp * f[same + diff] % MOD;
				tmp = tmp * dp[same + diff] % MOD;
				tmp = tmp * dp[same + diff] % MOD;
				if (m > 2) {
					if (same == 0) {
						tmp = 0;
					} else {
						tmp = tmp * power(same, n * (m - 2)) % MOD;
					}
				}
			//	printf("<%d,%d> + %lld\n", same, diff, tmp);
				ans = (ans + tmp) % MOD;
			}
		}
	}
	printf("%d\n", (int)ans);

	return 0;
}

/*
   2 3 2
   18

   3 3 3
   1839
   */

#include <bits/stdc++.h>

using namespace std;
#define int long long
const int N = 1e6 + 10, MOD = 1e9 + 7;
int fac[N], ifac[N], cnt[N];

int sum(int a, int b) {a %= MOD; b %= MOD; return ((a + b) % MOD + MOD) % MOD;}
int mul(int a, int b) {a %= MOD; b %= MOD; return (a * b) % MOD;}

int Pow(int n, int m)
{
    if (m == 0) return 1;
    int x = Pow(n, m / 2);
    return (mul(x, x) * (m % 2 ? n : 1)) % MOD;
}

int C(int n , int k)
{
    if (k < 0 || n < 0 || k > n) return 0;
    return mul( mul( fac[n] , ifac[k] ) , ifac[n - k] );
}

int32_t main()
{
    fac[0] = 1;
    for (int i = 1; i < N; i ++) fac[i] = mul(fac[i - 1], i);
    ifac[N - 1] = Pow(fac[N - 1] , MOD - 2);
    for (int i = N - 2; i >= 0; i --) ifac[i] = mul(ifac[i + 1], i + 1);
    int n, m, K, ans = 0; cin >> n >> m >> K;
    if (m == 1) return cout << Pow(K, n) << "\n", 0;
    for (int i = 0; i <= n; i ++) {
        cnt[i] = Pow(i, n);
        for (int j = 0; j < i; j ++) cnt[i] = sum(cnt[i] , (-1) * mul(C(i, j) , cnt[j]));
    }
    for (int k = 0; k <= n; k ++) {
        for (int a = 0; a + k <= n; a ++) {
            ans += mul( mul( mul( mul( Pow(a, (m - 2) * n) , C(K, k) ) , C(K - k, k) ) , C(K - 2 * k, a) ) , Pow(cnt[a + k], 2));
            ans %= MOD;
        }
    }
    cout << ans << "\n";

    return 0;
}

#include <bits/stdc++.h>

#define F first
#define S second
#define llong long long
#define ullong unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define cnt_bit __builtin_popcount

using namespace std;

const int MXN = (int)1e6 + 20;
const int INF = (int)1e9 + 7;
const llong LINF = (llong)1e18;
const double EPS = (double)1e-9;

int n, m, k;
llong f[MXN];
llong ans;
llong c[2100][2100];
llong mem[2100][2100];

llong binpow(llong x, llong y){
  llong res = 1LL;
  while(y){
    if(y & 1)
      res = (res * x) % INF;
    x = (x * x) % INF;
    y >>= 1;
  }
  return res;
}

llong cc(int n, int k){
  llong tmp = f[n];
  tmp = (tmp * binpow((f[n - k] * f[k]) % INF, INF - 2LL)) % INF;
  return tmp;
}

llong rec(int n, int k){
  if(mem[n][k] != -1)
    return mem[n][k];
  if(k > n)
    return mem[n][k] = 0;
  return mem[n][k] = (k * ((rec(n - 1, k) + rec(n - 1, k - 1)) % INF)) % INF;
}

int main(){
  #ifdef LOCAL
    freopen("input.txt", "r", stdin);
  #endif
  ios_base::sync_with_stdio(0);
  c[0][0] = 1LL;
  for(int i = 1; i <= 2000; ++i){
    c[i][0] = c[i][i] = 1LL;
    for(int j = 1; j < i; ++j){
      c[i][j] = c[i][j - 1] + c[i - 1][j - 1];
      if(c[i][j] >= INF)
        c[i][j] -= INF;
    }
  }
  f[0] = 1LL;
  for(int i = 1; i < MXN; ++i){
    f[i] = (f[i - 1] * 1LL * i) % INF;
  }
  memset(mem, -1, sizeof mem);
  mem[0][0] = 1;
  cin >> n >> m >> k;
  if(m == 1){
    cout << binpow(k, n);
  }
  else {
    for(int i = 1; i <= min(n, k); ++i){
      for(int j = 0; j <= i; ++j){
        if(i + i - j > k){
          continue;
        }
        llong tmp = rec(n, i);
        //cerr << i << " " << j << " " << tmp << "\n";
        tmp = (tmp % INF + INF) % INF;
        tmp = (tmp * tmp) % INF;
        //
        tmp = (tmp * cc(k, j)) % INF;
        tmp = (tmp * cc(k - j, i - j)) % INF;
        tmp = (tmp * cc(k - j - (i - j), i - j)) % INF;
        tmp = (tmp * binpow(j, n * (m - 2))) % INF;
        ans = (ans + tmp) % INF;
        //cerr <<"ans: "<< i << " " << j << " " << ans << "\n";
      }
    }
    cout << ans;
  }
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define Mod ((ll)1e9+7)
#define fr first
#define sc second
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())

#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))

ll fact[1000006];
ll invf[1000006];

ll modexpo(ll a,ll b)
{
	ll res=1;
	while(b)
	{
		if(b&1){
			res=(res*a)%Mod;
		}
		a=(a*a)%Mod;
		b>>=1;
	}
	return (res+Mod)%Mod;
}
ll modmul(ll a,ll b)
{
	ll ret = ( (a)%Mod * (b)%Mod )%Mod;
	return (ret+Mod)%Mod;
}
void ini()
{
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    fact[0]=1;
    for(ll i=1;i<1000005;i++)
    {
    	fact[i]=modmul(fact[i-1],i);
    }
    invf[1000000]=modexpo(fact[1000000],Mod-2);
    for(ll i=999999;i>=0;i--)
    {
    	invf[i]=modmul(invf[i+1],(i+1));
    }
}
ll com(ll n,ll r)
{
	if(n-r<0) return 0;
	ll ret = modmul(modmul(fact[n],invf[n-r]),invf[r]);
	return ret;
}
ll dp[(ll)1e6+5];
int main()
{
	ini();
    ll n,i,j,k,m,sum=0;
    cin>>n>>m>>k;

    dp[1]=1;
    for(i=2;i<=n;i++)
    {
    	dp[i] = modexpo(i,n);
    	for(j=1;j<i;j++)
    	{
    		dp[i] = (dp[i] - com(i,j)*dp[j] + Mod)%Mod;
    	}
    	//cout<<dp[i]<<endl;
    }
    if(m==1)
    {
    	cout<<(modexpo(k,n))<<endl;
    	return 0;
    }
    ll ans = 0;
    for(i=1;i<=min(n,k);i++)
    {
    	for(j=0;j<=i;j++)
    	{
    		//cout<<"hello ";
    		ll temp = modmul(fact[k],invf[j]);
    		//cout<<invf[k-2*i+j]<<" - ";
    		temp = modmul(temp,invf[k-2*i+j]);
    		//cout<<temp<<" - ";
    		temp = modmul(temp,modmul(invf[i-j],invf[i-j]));
    		temp = modmul(temp,modmul(dp[i],dp[i]));
    		temp = modmul(temp,modexpo(j,n*(m-2)));
    		ans = (ans + temp)%Mod;
    	}
    }
    cout<<(ans%Mod+Mod)%Mod<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
long long ff[2005][2005];
typedef long long LL;
const int MX = 1000005;
const int M = 1000000007;
LL inv[MX], f[MX], g[MX];
void init() {
	int i;
	inv[1] = 1;
	for (i = 2; i < MX; i++) inv[i] = inv[M % i] * (M - M/ i) % M;
	f[0] = g[0] = 1;
	for (i = 1; i < MX; i++) {
		f[i] = f[i - 1] * i % M;
		g[i] = g[i - 1] * inv[i] % M;
	}
}
inline LL C(int n, int k) {
	if (k < 0 || k > n) return 0;
	return f[n] * g[k] % M * g[n - k] % M;
}
LL powmod(int n ,int m){
	LL tmp = n ,ans = 1;
	while(m){
		if(m & 1) ans = ans * tmp % mod;
		m >>= 1;
		tmp = tmp * tmp % mod;
	}
	return ans;
}
void calc() {
	init();
	ff[1][1] = 1;
	for(int i = 2 ; i < 2005 ; i ++) {
		for(int j = 1 ; j < 2005 ; j ++) {

			ff[i][j] = j * ff[i - 1][j] + j * ff[i - 1][j - 1];
			ff[i][j] %= mod;
		}
	}
}
LL ans;
int main() {
	calc();
	int n ,m ,k;
	cin >> n >> m >> k;
	if(m == 1){
		cout << powmod(k ,n) << endl;
		return 0;
	}
	for(int i = 1 ;i <= min(n ,k) ;i ++){
		for(int j = 0 ;j <= i ;j ++){
			LL tmp = 1;
			if(m - 2) {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * (powmod(j ,n * (m - 2)) * C(i ,j) % mod) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
			else {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * C(i ,j) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
//			cout << i << ' ' << j << ' ' << ans << endl;
		}
	}
	cout << ans % mod << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
long long ff[2005][2005];
typedef long long LL;
const int MX = 1000005;
const int M = 1000000007;
LL inv[MX], f[MX], g[MX];
void init() {
	int i;
	inv[1] = 1;
	for (i = 2; i < MX; i++) inv[i] = inv[M % i] * (M - M/ i) % M;
	f[0] = g[0] = 1;
	for (i = 1; i < MX; i++) {
		f[i] = f[i - 1] * i % M;
		g[i] = g[i - 1] * inv[i] % M;
	}
}
inline LL C(int n, int k) {
	if (k < 0 || k > n) return 0;
	return f[n] * g[k] % M * g[n - k] % M;
}
LL powmod(int n ,int m){
	LL tmp = n ,ans = 1;
	while(m){
		if(m & 1) ans = ans * tmp % mod;
		m >>= 1;tmp = tmp * tmp % mod;
	}
	return ans;
}
void calc() {
	init();
	ff[1][1] = 1;
	for(int i = 2 ; i < 2005 ; i ++) {
		for(int j = 1 ; j < 2005 ; j ++) {
			ff[i][j] = j * ff[i - 1][j] + j * ff[i - 1][j - 1];
			ff[i][j] %= mod;
		}
	}
}
LL ans;
int main() {
	calc();
	int n ,m ,k;
	cin >> n >> m >> k;
	if(m == 1){
		cout << powmod(k ,n) << endl;
		return 0;
	}
	for(int i = 1 ;i <= min(n ,k) ;i ++){
		for(int j = 0 ;j <= i ;j ++){
			LL tmp = 1;
			if(m - 2) {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * (powmod(j ,n * (m - 2)) * C(i ,j) % mod) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
			else {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * C(i ,j) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
//			cout << i << ' ' << j << ' ' << ans << endl;
		}
	}
	cout << ans % mod << endl;
	return 0;
}

		//			- -- --- ---- -----be name khoda----- ---- --- -- -			\\

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const int N = 1221, MOD = 1e9 + 7;

ll n, m, k, t[N], c[N][N], fact[N * N];

ll pw(int p, int t)
{
	if(!t)
		return 1;
	ll res = pw(p, t / 2);
	res = res * res % MOD;
	if(t % 2)
		res *= p;
	return res % MOD;
}

void fil()
{
	fact[0] = 1;
	for(int i = 1; i < N * N; i++)
		fact[i] = fact[i - 1] * i % MOD;
	for(int i = 0; i < N; i++)
		c[i][i] = c[0][i] = 1;
	for(int i = 1; i < N; i++)
		for(int j = i + 1; j < N; j++)
			c[i][j] = (c[i - 1][j - 1] + c[i][j - 1]) % MOD;

	for(int i = 1; i <= min(k, m); i++)
	{
		t[i] = pw(i, m);
		for(int j = 1; j < i; j++)
			t[i] = ((t[i] - t[j] * c[j][i]) % MOD + MOD) % MOD;
	}
}

ll ch(int i, int k)
{
	if(i <= k)
		return fact[k] * pw(fact[i] * fact[k - i] % MOD, MOD - 2) % MOD;
	return 0;
}

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> m >> n >> k;
	fil();
	ll ans = 0;
	if(n == 1)
	{
		cout << pw(k, m) << endl;
		return 0;
	}
	if(n == 2)
	{
		for(int c = 1; c <= min(m, k); c++)
			ans = (ans + ch(c, k) * ch(c, k) % MOD * t[c] % MOD * t[c] % MOD) % MOD;
		cout << ans << endl;
		return 0;
	}
	for(int c = 1; c <= min(m, k); c++)
		for(int u = 1; u <= c; u++)
		{
			ll now;
			now = ch(c, k) * ch(u, c) % MOD * ch(c - u, k - c) % MOD;
			now = now * t[c] % MOD * t[c] % MOD;
			now = now * pw(u, n * m - 2 * m) % MOD;
			ans = (ans + now) % MOD;
		}
	cout << ans % MOD << endl;
}

/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author majk
 */

#ifndef MAJK_LIB
#define MAJK_LIB

#include <vector>
#include <stack>
#include <iostream>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <iomanip>
#include <set>
#include <functional>
#include <fstream>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <string>
#include <sstream>
#include <queue>
#include <bitset>
using namespace std;

#define x first
#define y second
typedef std::pair<int,int> pii; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef pair<ui,ui> puu;

template <typename T, typename U> std::istream&operator>>(std::istream&i, pair<T,U>&p) {i >> p.x >> p.y; return i;}
template<typename T>std::istream&operator>>(std::istream&i,vector<T>&t) {for(auto&v:t){i>>v;}return i;}
template <typename T, typename U> std::ostream&operator<<(std::ostream&o, const pair<T,U>&p) {o << p.x << ' ' << p.y; return o;}
template<typename T>std::ostream&operator<<(std::ostream&o,const vector<T>&t) {if(t.empty())o<<'\n';for(size_t i=0;i<t.size();++i){o<<t[i]<<" \n"[i == t.size()-1];}return o;}
template<typename T> using minheap = priority_queue<T, vector<T>, greater<T>>;
template<typename T> using maxheap = priority_queue<T, vector<T>, less<T>>;
template <typename T> bool in(T a, T b, T c) { return a <= b && b < c; }
ui logceil(int x) { return 8*sizeof(int)-__builtin_clz(x); }

namespace std { template<typename T,typename U>struct hash<pair<T,U>>{hash<T>t;hash<U>u;size_t operator()(const pair<T,U>&p)const{return t(p.x)^(u(p.y)<<7);}}; }
template<typename T,typename F>T bsh(T l,T h,const F&f){T r=-1,m;while(l<=h){m=(l+h)/2;if(f(m)){l=m+1;r=m;}else{h=m-1;}}return r;}
template<typename F> double bshd(double l,double h,const F&f,double p=1e-9){ui r=3+(ui)log2((h-l)/p);while(r--){double m=(l+h)/2;if(f(m)){l=m;}else{h=m;}}return (l+h)/2;}
template<typename T,typename F>T bsl(T l,T h,const F&f){T r=-1,m;while(l<=h){m=(l+h)/2;if(f(m)){h=m-1;r=m;}else{l=m+1;}}return r;}
template<typename F> double bsld(double l,double h,const F&f,double p=1e-9){ui r=3+(ui)log2((h-l)/p);while(r--){double m=(l+h)/2;if(f(m)){h=m;}else{l=m;}}return (l+h)/2;}
template<typename T> T gcd(T a,T b) { if (a<b) swap(a,b); return b?gcd(b,a%b):a; }

template<typename T>class vector2:public vector<vector<T>>{public:vector2(){} vector2(size_t a,size_t b,T t=T()):vector<vector<T>>(a,vector<T>(b,t)){}};
template<typename T>class vector3:public vector<vector2<T>>{public:vector3(){} vector3(size_t a,size_t b,size_t c,T t=T()):vector<vector2<T>>(a,vector2<T>(b,c,t)){}};
template<typename T>class vector4:public vector<vector3<T>>{public:vector4(){} vector4(size_t a,size_t b,size_t c,size_t d,T t=T()):vector<vector3<T>>(a,vector3<T>(b,c,d,t)){}};
template<typename T>class vector5:public vector<vector4<T>>{public:vector5(){} vector5(size_t a,size_t b,size_t c,size_t d,size_t e,T t=T()):vector<vector4<T>>(a,vector4<T>(b,c,d,e,t)){}};

#endif
 #ifndef MOD_H
#define MOD_H

template <unsigned int N> class Field {
    typedef unsigned int ui;
    typedef unsigned long long ull;
	inline ui pow(ui a, ui p){ui r=1,e=a;while(p){if(p&1){r=((ull)r*e)%N;}e=((ull)e*e)%N;p>>=1;}return r;}
	/*extended GCD(slow):ll t=0,nt=1,r=N,nr=a;while(nr){ll q=r/nr;t-=q*nt;swap(t,nt);r-=q*nr;swap(r,nr);}assert(r<=1);return(t<0)?t+N:t;*/
	inline ui inv(ui a){return pow(a,N-2);}
public:
    inline Field(int x = 0) : v(x) {}
	inline Field<N> pow(int p){return (*this)^p; }
	inline Field<N> operator^(int p){return {(int)pow(v,(ui)p)};}
    inline Field<N>&operator+=(const Field<N>&o) {if ((ll)v+o.v >= N) v += o.v - N; else v += o.v; return *this; }
    inline Field<N>&operator-=(const Field<N>&o) {if (v<o.v) v -= o.v-N; else v-=o.v; return *this; }
    inline Field<N>&operator*=(const Field<N>&o) {v=(ull)v*o.v % N; return *this; }
    inline Field<N>&operator/=(const Field<N>&o) { return *this*=inv(o.v); }
    inline Field<N> operator+(const Field<N>&o) const {Field<N>r{*this};return r+=o;}
    inline Field<N> operator-(const Field<N>&o) const {Field<N>r{*this};return r-=o;}
    inline Field<N> operator*(const Field<N>&o) const {Field<N>r{*this};return r*=o;}
    inline Field<N> operator/(const Field<N>&o) const {Field<N>r{*this};return r/=o;}
    inline Field<N> operator-() {if(v) return {(int)(N-v)}; else return {0};};
    inline Field<N>& operator++() { ++v; if (v==N) v=0; return *this; }
    inline Field<N> operator++(int) { Field<N>r{*this}; ++*this; return r; }
    inline Field<N>& operator--() { --v; if (v==-1) v=N-1; return *this; }
    inline Field<N> operator--(int) { Field<N>r{*this}; --*this; return r; }
    inline bool operator==(const Field<N>&o) const { return o.v==v; }
	inline bool operator!=(const Field<N>&o) const { return o.v!=v; }
	inline explicit operator ui() const { return v; }
	inline static vector<Field<N>>fact(int t){vector<Field<N>>F(t+1,1);for(int i=2;i<=t;++i){F[i]=F[i-1]*i;}return F;}
	inline static vector<Field<N>>invfact(int t){vector<Field<N>>F(t+1,1);Field<N> X{1};for(int i=2;i<=t;++i){X=X*i;}F[t]=1/X;for(int i=t-1;i>=2;--i){F[i]=F[i+1]*(i+1);}return F;}
private: ui v;
};
template<unsigned int N>istream &operator>>(std::istream&is,Field<N>&f){unsigned int v;is>>v;f=v;return is;}
template<unsigned int N>ostream &operator<<(std::ostream&os,const Field<N>&f){return os<<(unsigned int)f;}
template<unsigned int N>Field<N> operator+(int i,const Field<N>&f){return Field<N>(i)+f;}
template<unsigned int N>Field<N> operator-(int i,const Field<N>&f){return Field<N>(i)-f;}
template<unsigned int N>Field<N> operator*(int i,const Field<N>&f){return Field<N>(i)*f;}
template<unsigned int N>Field<N> operator/(int i,const Field<N>&f){return Field<N>(i)/f;}

typedef Field<1000000007> FieldMod;

struct Ring {
	static int div(int p, int q, int N) {
		ll t=0,nt=1,r=N,nr=q;
		while(nr){ ll q=r/nr;t-=q*nt;r-=q*nr;swap(t,nt);swap(r,nr); }
		t=(t<0)?t+N:t;
		r=(r<0)?r+N:r;
		if (gcd(p,N)%r) { return 0; }
		return (int)(((ll)t*(ll)p/r)%N);
	}
};
#endif

class PetyaAndColoring {
public:
void solve(istream& cin, ostream& cout) {
    int N, M, K; cin >> N >> M >> K;
    if (M == 1) {
        cout << FieldMod{K}.pow(N) << '\n';
        return;
    }

    vector2<FieldMod> C(N+1, N+1, 0);
    C[0][0] = 1;
    for (int i = 0; i < N; ++i) {
        for (int j = 0; j <= i; ++j) {
            C[i+1][j] += C[i][j] * j;
            C[i+1][j+1] += C[i][j];
        }
    }

    auto F = FieldMod::fact(1000000);
    auto I = FieldMod::invfact(1000000);

    FieldMod ans = 0;
    for (int c = 0; c <= N; ++c) {
        for (int a = c; a <= N; ++a) {
            int s = a - c;
            if (s + s + c > K || a == 0) continue;
            ans += C[N][a] * C[N][a] * F[K] * I[s] * I[s] * I[c] * I[K - s - s - c] * F[a] * F[a] * FieldMod{c}.pow(N*(M-2));
        }
    }

    cout << ans << endl;
}
};

int main() {
	ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
	PetyaAndColoring solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
    return 0;
}

#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>

using namespace std;

#define fo(i, a, b) for(int i = a; i <= b; i++)
#define _fo(i, a, b) for(int i = a; i >= b; i--)
#define foa(i, a) for (auto &i : a)
#define sz(a) ((int) a.size())
#define all(a) begin(a), end(a)
#define fi first
#define se second
#define pb(x) push_back(x)
#define mk(x, y) make_pair(x, y)
#define log2i(x) (31-__builtin_clz(x))
#define log2ll(x) (63-__builtin_clzll(x))
#define bsz(x) __builtin_popcount(x)

typedef int64_t ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef vector<int> vi;

const int K = 1e6+5;
const int MAX = 1e3+5;
const int MOD = 1e9+7;
const ll INF = INT_MAX;
const ll _INF = INT_MIN;

ll n, m, k;
ll fac[K], infac[K], total[MAX][MAX];

ll Pow(ll a, ll b) {
	if(b == 0) return 1;
	if(a == 0 || a == 1) return a;

	ll curr = 1;
	while(b > 0) {
		if(b % 2 != 0) curr = (curr*a) % MOD;
		a = (a*a) % MOD;
		b /= 2;
	}

	return curr;
}

void precompute() {
	fac[0] = 1;
	fo(i, 1, k) fac[i] = (fac[i-1]*i) % MOD;
	infac[k] = Pow(fac[k], MOD-2);
	_fo(i, k-1, 0) infac[i] = (infac[i+1]*(i+1)) % MOD;

	total[0][0] = 1;
	fo(len, 1, n) {
		fo(x, 1, k) {
			if(x > len) break;
			total[len][x] = (((total[len-1][x]+total[len-1][x-1]) % MOD) * x) % MOD;
		}
	}
}

ll nCr(ll a, ll b) {
	return (((fac[a]*infac[a-b]) % MOD) * infac[b]) % MOD;
}

ll cal(ll i, ll j) {
	ll mid = (Pow(i, n*(m-2))*nCr(k, i)) % MOD;
	ll lm = (nCr(k-i, j)*total[n][i+j]) % MOD;
	ll rm = (nCr(k-i-j, j)*total[n][i+j]) % MOD;
	return (((lm*rm) % MOD) * mid) % MOD;
}

ll solve() {
	if(m == 1) return Pow(k, n);
	else {
		precompute();
		ll ans = 0;
		int temp = min(n, k);
		fo(i, 0, k) {
			if(i > n) break;
			ll mid = (Pow(i, n*(m-2))*nCr(k, i)) % MOD, curr = 0;
			fo(j, 0, k) {
				if(i+j > n) break;
				if(i+j*2 > k) break;
				ll lm = (nCr(k-i, j)*total[n][i+j]) % MOD;
				ll rm = (nCr(k-i-j, j)*total[n][i+j]) % MOD;
				curr = (curr + ((lm*rm) % MOD)) % MOD;
			}
			ans = (ans + ((mid*curr) % MOD)) % MOD;
		}

		return ans;
	}
}

signed main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	cin >> n >> m >> k;

	cout << solve();
}

#include<iostream>
#include<cstdio>
#include<map>
#include<cstring>
#include<cmath>
#include<vector>
#include<algorithm>
#include<set>
#include<string>
#include<queue>
#define inf 1600005
#define M 40
#define N 100001
#define maxn 300005
#define eps 1e-12
#define zero(a) fabs(a)<eps
#define Min(a,b) ((a)<(b)?(a):(b))
#define Max(a,b) ((a)>(b)?(a):(b))
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define mem(a,b) memset(a,b,sizeof(a))
#define LL unsigned long long
#define MOD 1000000007
#define lson step<<1
#define rson step<<1|1
#define sqr(a) ((a)*(a))
#define Key_value ch[ch[root][1]][0]
#define test puts("OK");
#define pi acos(-1.0)
#define lowbit(x) ((-(x))&(x))
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
int n,m,k;
LL fac[1000005]={1},rev[1000005]={1};
LL dp[1005];
LL PowMod(LL a,LL b){
    LL ret=1;
    while(b){
        if(b&1) ret=ret*a%MOD;
        a=a*a%MOD;
        b>>=1;
    }
    return ret;
}
void Init(){
    for(int i=1;i<=1000000;i++)
        fac[i]=fac[i-1]*i%MOD,rev[i]=PowMod(fac[i],MOD-2);
}
LL C(int n,int m){
    return (fac[n]*rev[m]%MOD)*rev[n-m]%MOD;
}
int main(){
    //freopen("in.txt","r",stdin);
    Init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        if(m==1) {printf("%I64d\n",PowMod(k,n));continue;}
        for(int i=1;i<=n&&i<=k;i++){
            dp[i]=PowMod(i,n);
            for(int j=1;j<i;j++){
                dp[i]=(dp[i]-C(i,j)*dp[j]%MOD+MOD)%MOD;
            }
        }
        LL ret=0;
        if(m==2){
            for(int i=1;i<=n&&i<=k;i++){
                LL tmp=(dp[i]*dp[i])%MOD;
                tmp=(tmp*C(k,i)%MOD)*C(k,i)%MOD;
                ret=(ret+tmp)%MOD;
            }
        }
        else{
            for(int i=1;i<=n&&i<=k;i++){
                for(int j=0;j<=n&&j<=k;j++){
                    if(k<2*j+i||i+j>n) break;
                    LL tmp=dp[i+j]*dp[i+j]%MOD;
                    tmp=((tmp*C(k,i)%MOD)*C(k-i,j)%MOD)*C(k-i-j,j)%MOD;
                    tmp=(tmp*PowMod(i,n*(m-2)))%MOD;
                    ret=(ret+tmp)%MOD;
                }
            }
        }
        printf("%I64d\n",ret);
    }
    return 0;
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define mp make_pair
#define popb pop_back
#define popf pop_front
#define all(v) v.begin(), v.end()
#define fori(i, j, k) for (int i = (j); i < (int)(k); i++)
#define forb(i, j, k) for (int i = (j); i >= (int)k; i--)
#define lchild(ind) 2 * ind + 1
#define rchild(ind) 2 * ind + 2
#define bug(val) cout << "# " << val << endl;
#define bugs(val) cout << '_' << val;
#define bugl(val) cout << "## " << val << endl;

template<typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
typedef pair<int, pll> pip;
typedef pair<ll, pll> plp;
typedef pair<pll, int> ppi;
typedef pair<pll, ll> ppl;
typedef pair<pll, pll> ppp;
typedef vector<int> vi;
typedef vector<ll> vll;

const int maxn = 1e3 + 1;
const ll inf = 2e18, mod = 1e9 + 7;

int n, m, k;
ll fact[maxn * maxn], inv[maxn * maxn], dp[maxn][maxn];

ll powmod(ll a, ll b)
{
	if (!b)
		return 1;
	ll tmp = powmod(a, b / 2);
	tmp = tmp * tmp % mod;
	if (b & 1)
		tmp = tmp * a % mod;
	return tmp;
}

ll c(ll n, ll r)
{
	if (r > n || n < 0 || r < 0)
		return 0;
	return (fact[n] * (inv[r] * inv[n - r] % mod) % mod);
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	fact[0] = 1;
	inv[0] = 1;
	fori (i, 1, maxn * maxn)
	{
		fact[i] = fact[i - 1] * i % mod;
		inv[i] = powmod(fact[i], mod - 2);
	}
	dp[0][0] = 1;
	fori (i, 1, maxn)
		fori (j, 1, i + 1)
			dp[i][j] = (ll)j * (dp[i - 1][j] + dp[i - 1][j - 1]) % mod;

	cin >> n >> m >> k;
	if (m == 1)
	{
		cout << powmod(k, n) << endl;
		return 0;
	}
	ll ans = 0;
	fori (i, 1, n + 1)
		fori (j, 0, i + 1)
		{
			ll add = c(k, i) * c(i, j) % mod;
			add = add * c(k - i, i - j) % mod;
			add = add * powmod(j, n * m - 2 * n) % mod;
			add = add * (dp[n][i] * dp[n][i] % mod) % mod;
			ans = (ans + add) % mod;
		}
	cout << ans << endl;
}

#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <ctime>
#include <complex>
#include <cassert>
#include <array>
#include <bitset>
#include <unordered_map>

using namespace std;
typedef long long LL;
typedef pair<int,int> P;

LL M=1e9+7;
const int L=1001;

// a>=0, b>=0, x*a+y*b=gcd>=0, a>0,b>0=>abs(y)<=a,abs(x)<=b
LL gcdex(LL a,LL b,LL& x, LL& y){
	LL ax=1,ay=0;
	LL bx=0,by=1;
	while(b){
		LL r=a/b;
		LL t=a-r*b; a=b; b=t;
		LL tx=ax-r*bx; ax=bx; bx=tx;
		LL ty=ay-r*by; ay=by; by=ty;
	}
	x=ax;
	y=ay;
	return a;
}
LL modinv(LL a, LL mod){
	LL x,y;
	gcdex(a,mod,x,y);
	if(x<0){
		x+=mod;
	}
	return x;
}
// powmod p^n%mod
LL powmod(LL p,LL n,LL mod){
	LL q=p%mod;
	LL pow=1;
	while(n){
		if(n&1){
			pow*=q;
			pow%=mod;
		}
		q=q*q;
		q%=mod;
		n/=2;
	}
	return pow;
}
const int N=1e6+1;
template<int S>
struct Comb
{
	LL r[S+1];
	LL f[S+1];
	LL mod;
	Comb(int m)
	{
		mod=m;
		f[0]=1;
		r[0]=1;
		for(LL i=1;i<=S;i++){
			f[i]=i*f[i-1]%m;
			r[i]=modinv(i,m)*r[i-1]%m;
		}
	}
	LL c(int n,int i){
		if(i<0||n<i)
		{
			//assert(0);
			return 0;
		}
		return f[n]*r[i]%mod*r[n-i]%mod;
	}
};
Comb<N> comb(M);
LL C(int n,int i){
	return comb.c(n,i);
}
LL mem[L][L];

LL ps[L];
int main() {
	int n,m,k;
	cin >> n >> m >> k;
	for(int i=1;i<=n;i++){
		ps[i]=1;
		for(int j=0;j<n;j++){
			ps[i]*=i;
			ps[i]%=M;
		}
	}
	if(m==1){
		cout << powmod(k,n,M) << endl;
		return 0;
	}
	//cerr << "aa" << endl;
	LL ret=0;
	for(int i=1;i<=n;i++){
		LL v=0;
		LL s=1;
		for(int j=i;j>=1;j--){
			v+=(M+s)%M*ps[j]%M*C(i,j)%M;
			v%=M;
			s*=-1;
		}
		for(int j=0;j<=i;j++){
			ret+=C(k,i)*v%M*v%M*C(i,j)%M*powmod(j,n*(m-2),M)%M*C(k-i,i-j)%M;
			ret%=M;
		}
	}
	cout << ret << endl;

	return 0;
}

#include <bits/stdc++.h>

using namespace std;

const int mod = 1e9+7;

int add(int a, int b) {
	return a + b < mod ? a + b : a + b - mod;
}
int mul(int a, int b) {
	return int(1LL * a * b % mod);
}
int fexp(int b, int e = mod - 2) {
	int ans = 1;
	while(e) {
		if(e & 1) ans = mul(ans, b);
		b = mul(b, b);
		e /= 2;
	}
	return ans;
}

const int N = 1005, M = N * N;

int fat[M], ifat[M];
int C(int n, int k) {
	if(k > n) return 0;
	return mul(mul(fat[n], ifat[k]), ifat[n - k]);
}

int dp[N][N];

int f(int n, int k) {
	if(n == 0) return k == 0;
	if(k == 0) return 0;
	int &ans = dp[n][k];
	if(~ans) return ans;
	return ans = mul(k, add(f(n - 1, k - 1), f(n - 1, k)));
}

int n, m, k;

int prec[N];

int main() {
	memset(dp, -1, sizeof dp);

	fat[0] = 1;
	for(int i = 1; i < M; i++) fat[i] = mul(i, fat[i - 1]);
	ifat[M - 1] = fexp(fat[M - 1]);
	for(int i = M - 2; i >= 0; i--) ifat[i] = mul(i + 1, ifat[i + 1]);

	scanf("%d %d %d", &n, &m, &k);

	if(m == 1) return printf("%d\n", fexp(k, n)), 0;
	int ans = 0;
	if(m == 2) {
		for(int i = 1; i <= n and i <= k; i++) {
			int a = mul(C(k, i), f(n, i));
			a = mul(a, a);
			ans = add(ans, a);
		}
	}
	else {
		for(int i = 1; i <= n and i <= k; i++) {
			for(int j = 1; j <= i; j++) {
				int a = f(n, i);
				a = mul(a, a);
				a = mul(a, fexp(j, n * (m - 2)));
				a = mul(C(k, i), a);
				a = mul(C(i, j), a);
				a = mul(C(k - i, i - j), a);
				ans = add(ans, a);
			}
		}
	}

	printf("%d\n", ans);

}

#include<cstdio>
#include<cstring>
#include<algorithm>
#define maxn 1005
#define maxK 1000050
#define MOD 1000000007
using namespace std;
typedef long long LL;

int        n,m,K;
LL        dp[maxn];

LL        quick_sqr(LL g , int K ){
    LL    ret = 1;
    while ( K ) {
        if ( K&1 ) ret = ret*g%MOD;
        g = g*g%MOD;
        K>>= 1;
    }
    return ret;
}

LL        sum[maxK],psum[maxK];
inline     LL    C(int a ,int b) {
    return sum[a]*psum[b]%MOD*psum[a-b]%MOD;
}
int        main(){
    sum[0] = psum[0] = 1;
    for (int i = 1; i<maxK; i++) {
        sum[i] = sum[i-1]*i%MOD;
        psum[i] = quick_sqr( sum[i],MOD-2);
    }
    scanf("%d%d%d", &n,&m, &K );
    for (int i = 1; i<=n; i++) {
        dp[i] = quick_sqr(i,n);
        for (int k = 1; k<i; k++) {
            dp[i] += MOD-C(i,k)*dp[k]%MOD;
            dp[i] %= MOD;
        }
    }
    LL    A = 1, ans = 0;
    if ( m == 1 ){
        printf("%I64d\n", quick_sqr(K,n) );
        return 0;
    }
    if ( m == 2 ){
        for (int j = 1,i = 0; i+j*2<=K && i+j<=n; j++){
            ans += dp[i+j]*dp[i+j]%MOD*C(K,i)%MOD*C(K-i,j)%MOD*C(K-i-j,j)%MOD*quick_sqr(i,n*(m-2))%MOD;
            if ( ans >= MOD ) ans -= MOD;
        }
    }
    for (int i = 1; i<=min(n,K); i++ )
        for (int j = 0; i+j*2<=K && i+j<=n ; j++){
            ans += dp[i+j]*dp[i+j]%MOD*C(K,i)%MOD*C(K-i,j)%MOD*C(K-i-j,j)%MOD*quick_sqr(i,n*(m-2))%MOD;
            if ( ans >= MOD ) ans -= MOD;
        }
    printf("%I64d\n" , ans );

}

#include <cstdio>
#include <cstring>
#define R register
#define Min(_A, _B) (_A < _B ? _A : _B)
const int Mod = 1e9 + 7;
int n, m, K, P[1010], f[1010], Q[1010], Ans, tmp;
int Pow(R int A, R int K)
{
	R int d = 1;
	while(K)
	{
		if(K & 1) d = 1ll * d * A % Mod;
		K >>= 1;
		A = 1ll * A * A % Mod;
	}
	return d;
}
namespace Steaunk
{
	void main()
	{
		for(R int i = 1; i <= Min(K, n); i++)
		{
			f[i] = Pow(i, n);
			R int C = i;
			for(R int j = 1; j < i; j++)
			{
				(f[i] -= 1ll * f[j] * C % Mod) %= Mod;
				C = 1ll * C * (i - j) % Mod * P[j + 1] % Mod;
			}
			(f[i] += Mod) %= Mod;
		}
		Ans = 0;
		if(m == 1) Ans = Pow(K, n);
		else if(m == 2)
		{
			R int C = K;
			for(R int i = 1; i <= Min(K, n); i++)
			{
				(Ans += 1ll * f[i] * f[i] % Mod * C % Mod * C % Mod) %= Mod;
				C = 1ll * C * (K - i) % Mod * P[i + 1] % Mod;
			}
		}
		else
		{
			R int t1 = K, t2, t3;
			for(R int i = 1; i <= n; i++) Q[i] = Pow(K - i, Mod - 2);
			for(R int i = 1; i <= Min(K, n); i++)
			{
				t2 = t3 = 1;
				R int u = Pow(i, n * (m - 2));
				for(R int j = 0; (j << 1) + i <= K && i + j <= n; j++)
				{
					R int tmp = 1ll * f[i + j] * f[i + j] % Mod;
					tmp = 1ll * tmp * t1 % Mod * t2 % Mod * t3 % Mod * u % Mod;
					(Ans += tmp) %= Mod;
					t2 = 1ll * t2 * (K - i - j) % Mod * P[j + 1] % Mod;
					t3 = 1ll * t3 * (K - i - j - j) % Mod * (K - i - j - j - 1) % Mod
						    * Q[i + j] % Mod * P[j + 1] % Mod;
				}
				t1 = 1ll * t1 * (K - i) % Mod * P[i + 1] % Mod;
			}
		}
		printf("%d\n", Ans);
	}
}
int main()
{
	for(R int i = 1; i <= 1005; i++) P[i] = Pow(i, Mod - 2);
	while(scanf("%d %d %d", &n, &m, &K) != EOF) Steaunk::main();
	return 0;
}

#include <cstdio>
#include <cstring>
#define R register
#define Min(_A, _B) (_A < _B ? _A : _B)
const int Mod = 1e9 + 7;
int n, m, K, P[1010], f[1010], Q[1010], Ans, tmp, c[1010][1010];
int Pow(R int A, R int K)
{
	R int d = 1;
	while(K)
	{
		if(K & 1) d = 1ll * d * A % Mod;
		K >>= 1;
		A = 1ll * A * A % Mod;
	}
	return d;
}
namespace Steaunk
{
	void main()
	{
		for(R int i = 1; i <= Min(K, n); i++)
		{
			f[i] = Pow(i, n);
			for(R int j = 1; j < i; j++) (f[i] -= 1ll * f[j] * c[i][j] % Mod) %= Mod;
			(f[i] += Mod) %= Mod;
		}
		Ans = 0;
		if(m == 1) Ans = Pow(K, n);
		else if(m == 2)
		{
			R int C = K;
			for(R int i = 1; i <= Min(K, n); i++)
			{
				(Ans += 1ll * f[i] * f[i] % Mod * C % Mod * C % Mod) %= Mod;
				C = 1ll * C * (K - i) % Mod * P[i + 1] % Mod;
			}
		}
		else
		{
			R int t1 = K, t2, t3;
			for(R int i = 1; i <= n; i++) Q[i] = Pow(K - i, Mod - 2);
			for(R int i = 1; i <= Min(K, n); i++)
			{
				t2 = t3 = 1;
				R int u = Pow(i, n * (m - 2));
				for(R int j = 0; (j << 1) + i <= K && i + j <= n; j++)
				{
					R int tmp = 1ll * f[i + j] * f[i + j] % Mod;
					tmp = 1ll * tmp * t1 % Mod * t2 % Mod * t3 % Mod * u % Mod;
					(Ans += tmp) %= Mod;
					t2 = 1ll * t2 * (K - i - j) % Mod * P[j + 1] % Mod;
					t3 = 1ll * t3 * (K - i - j - j) % Mod * (K - i - j - j - 1) % Mod
						    * Q[i + j] % Mod * P[j + 1] % Mod;
				}
				t1 = 1ll * t1 * (K - i) % Mod * P[i + 1] % Mod;
			}
		}
		printf("%d\n", Ans);
	}
}
int main()
{
	for(R int i = 1; i <= 1005; i++) P[i] = Pow(i, Mod - 2);
	for(R int i = 0; i <= 1005; c[i][0] = 1, i++)
		for(R int j = 1; j <= i; j++)
			c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % Mod;
	while(scanf("%d %d %d", &n, &m, &K) != EOF) Steaunk::main();
	return 0;
}

//TMWCTW...
#include <bits/stdc++.h>
#define int long long

using namespace std;

const int maxn = 1e6 + 20, Mod = 1e9 + 7, maxm = 1e3 + 20;
int n, m, k, fact[maxn], inv[maxn], dp[maxm][maxm], ans;

int poww(int x, int y){
    if(!y)return 1;
    int tmp = poww(x, y / 2);
    tmp = (tmp * tmp) % Mod;
    if(y % 2)tmp = (tmp * x) % Mod;
    return tmp;
}

void fl(){
    fact[0] = 1;
    for(int i = 1; i < maxn; i++){
        fact[i] = (fact[i - 1] * i) % Mod;
    }
    inv[maxn - 1] = poww(fact[maxn - 1], Mod - 2);
    for(int i = maxn - 2; i >= 0; i--){
        inv[i] = (inv[i + 1] * (i + 1)) % Mod;
    }
}

int choose(int x, int y){
    if(y < x)return 0;
    return ((((fact[y] * inv[x]) % Mod) * inv[y - x]) % Mod);
}

int32_t main(){
    cin >> n >> m >> k;
    if(m == 1){
        cout << poww(k, n);
        return 0;
    }
    fl();
    dp[0][0] = 1;
    for(int i = 1; i < maxm; i++){
        for(int j = 1; j < maxm; j++){
            dp[i][j] = (j * dp[i - 1][j] + j * dp[i - 1][j - 1]) % Mod;
        }
    }
    //cout << dp[3][1] << endl;
    for(int x = 1; x <= min(n, k); x++){
        for(int y = 0; y <= x; y++){
            int tmp = choose(x, k);
            tmp = (tmp * choose(y, x)) % Mod;
            tmp = (tmp * choose(x - y, k - x)) % Mod;
            tmp = (tmp * poww(dp[n][x], 2)) % Mod;
            tmp = (tmp * poww(y, (n * (m - 2)))) % Mod;
            //cout << x << "  " << y << "  " << tmp << endl;
            ans = (ans + tmp) % Mod;
        }
    }
    cout << ans;
    return 0;
}

#include <cstdio>
#include <cstring>
#define R register
#define Min(_A, _B) (_A < _B ? _A : _B)
const int Mod = 1e9 + 7;
int n, m, K, fact[1000010], ufact[1000010], f[1000010], Ans, tmp;
int Pow(R int A, R int K)
{
	R int d = 1;
	while(K)
	{
		if(K & 1) d = 1ll * d * A % Mod;
		K >>= 1;
		A = 1ll * A * A % Mod;
	}
	return d;
}
int main()
{
	scanf("%d %d %d", &n, &m, &K);
	fact[0] = 1; for(R int i = 1; i <= K; i++) fact[i] = 1ll * fact[i - 1] * i % Mod;
	ufact[K] = Pow(fact[K], Mod - 2);
	for(R int i = K; i; i--) ufact[i - 1] = 1ll * ufact[i] * i % Mod;
	for(R int i = 1; i <= Min(K, n); i++)
	{
		f[i] = Pow(i, n);
		for(R int j = 1; j < i; j++)
		{
			R int C = 1ll * fact[i] * ufact[j] % Mod * ufact[i - j] % Mod;
			(f[i] -= 1ll * f[j] * C % Mod) %= Mod;
		}
		(f[i] += Mod) %= Mod;
	}
	if(m == 1) Ans = Pow(K, n);
	else if(m == 2)
	{
		for(R int i = 1; i <= Min(K, n); i++)
		{
			R int C = 1ll * fact[K] * ufact[i] % Mod * ufact[K - i] % Mod;
			(Ans += 1ll * f[i] * f[i] % Mod * C % Mod * C % Mod) %= Mod;
		}
	}
	else
	{
		for(R int i = 1; i <= Min(K, n); i++)
			for(R int j = 0; (j << 1) + i <= K && i + j <= n; j++)
			{
				R int tmp = 1ll * f[i + j] * f[i + j] % Mod;
				tmp = 1ll * tmp * fact[K] % Mod * ufact[i] % Mod * ufact[K - i] % Mod;
				tmp = 1ll * tmp * fact[K - i] % Mod * ufact[j] % Mod * ufact[K - i - j] % Mod;
				tmp = 1ll * tmp * fact[K - i - j] % Mod * ufact[j] % Mod * ufact[K - i - j - j] % Mod;
				tmp = 1ll * tmp * Pow(i, n * (m - 2)) % Mod;
				(Ans += tmp) %= Mod;
			}
	}
	printf("%d\n", Ans);
	return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>

using namespace std;

#define FOREACH(i, c) for(__typeof( (c).begin() ) i = (c).begin(); i != (c).end(); ++i)
#define FOR(i, a, n) for(__typeof(n) i = (a); i<(n); ++i)
#define REP(i, n, a) for(__typeof(n) i = (n); i>=(a); --i)
#define error(n) cout << #n << " = " << n << endl
#define all(c) c.begin(), c.end()
#define pb push_back
#define po pop_back
#define Size(n) ((int)(n).size())
#define pii pair<int, int>
#define X first
#define Y second
// #define X real()
// #define Y imag()

typedef long long   ll ;
typedef long double ld ;

const int MAXN = 1000 + 10 ;
const int MAXK = 1000 * 1000 + 10 ;
const ll MOD = 1000LL * 1000 * 1000 + 7 ;

int n , m , k ;
ll dp[MAXN][MAXN] ;
ll fac[MAXK] ;

ll Pow (ll a , ll b) {
    if (b == 0) return 1 ;
    ll c = Pow(a,b/2) ; c = (c*c)%MOD ;
    if (b%2) c = (c*a)%MOD ;
    return c ;
}

ll ModularInverse (ll a) {
    return Pow(a,MOD-2) ;
}

ll C (ll n , ll r) {
    return  ( fac[n]*ModularInverse ((fac[r]*fac[n-r])%MOD) ) % MOD;
}

int main() {
    cin >> n >> m >> k ;

    //
    dp[0][0] = 1 ;
    for (int i = 1 ; i <= n ; ++i)
        for (ll j = 1 ; j <= i ; ++j)
            dp[i][j] = (j*dp[i-1][j] + j*dp[i-1][j-1])%MOD ;
    fac[0] = 1 ;
    for (int i = 1 ; i <= k ; ++i)
        fac[i] = (fac[i-1]*i)%MOD ;
    //
    ll ans = 0 ;
    if (m == 1) {
        for (int i = 1 ; i <= min(n,k) ; ++i)
            ans = (ans+dp[n][i]*C(k,i))%MOD ;
        cout << ans << endl ;
        return 0 ;
    }
    for (int i = 1 ; i <= min(n,k) ; ++i) {
        for (int com = 0 ; com <= i ; ++com) {
            ll a = (dp[n][i]*dp[n][i])%MOD ;
            ll b0 = (C(k,2*i-com)*C(2*i-com,com))%MOD ;
            ll b  = (b0*C(2*(i-com),i-com))%MOD ;
//             cerr << i << " , " << com << " :--> " << a << " " << b << endl ;
            ll c  = (a*b)%MOD ;
            ans = (ans+c*Pow(com,(m-2)*n))%MOD ;
        }
    }
    cout << ans << endl ;
    return 0 ;
}

/* Author : RISHAV GOYAL */

#include <bits/stdc++.h>
using namespace std;

#define LL long long int
#define UL unsigned long long int

#define imax INT_MAX
#define imin INT_MIN
#define LLmax LLONG_MAX
#define LLmin LLONG_MIN

#define FOR(i,a,b) for(int i= (int)a; i<= (int)b; i++)
#define rep(i,n) for(int i= int(1); i<= (int)n; i++)
#define FORd(i,a,b,d) for(int i=(int)a; i<= (int)b; i+=(int)d)

#define pr() printf("Reached here 1...\n");
#define pr1() printf("Reached here 2...\n");

#define CLR(a) memset(a,0,sizeof(a));
#define SET(a) memset(a,-1,sizeof(a));

#define str strlen
#define pb(x) push_back(x)
#define mp make_pair
#define ii pair<int,int>
#define F first
#define S second
#define gcd(a,b) __gcd(a,b)

#define mod int(1e9 +7)
#define MAX int(1e5 + 10)

#define si(a) scanf("%d",&a);

#define VI vector<int>
#define VL vector<LL>
#define VS vector<string>
#define VC vector<char>

LL powmod(LL a,int b,int n){ if(!a) return 1; LL rm=1;while (b){if (b % 2) { rm = (rm * a) % n; }a = (a * a) % n;b /= 2;}return rm;}

LL s[1010][1010]={0},fac[1000010]={0}, invfac[1000010],dpfac[1010][1010]={0}, dp[1010][1010]={0};
int n,m,k;

LL ncr(int n,int r){
	LL ans = (fac[n] * invfac[r]) % mod;
	ans = ans * invfac[n-r];
	return ans % mod;
}

int main(){

	cin >> n >> m >> k;
	if(m==1){
		cout << powmod(k,n,mod) << endl;
		return 0;
	}

	LL ans = 0, fans = 0, choose;
	fac[0] = 1;
	for(LL i = 1; i<= 1e6;++i) fac[i] = ( i * fac[i-1] ) % mod;

	LL mul = 1;

	for(LL i=0;i<=1e6;++i){
		invfac[i] = powmod(i , mod - 2 , mod);
		if ( i) invfac[i] = (invfac[i] * invfac[i-1]) % mod;
	}

	s[0][0] = 1;
	for(int i=0;i<=1e3;++i){
		for(LL j=0;j<=i;++j){
			s[i+1][j] = (s[i+1][j] + s[i][j] * j) % mod;
			s[i+1][j+1] = ( s[i+1][j+1] + s[i][j]) % mod;
		}
	}
	LL ways , val, ways2;

	for(int totaldist = 1; totaldist <= min(k,n); ++ totaldist){

		for(int shared=1;shared<=totaldist;++shared){
			if(shared+ 2* ( totaldist - shared) > k) continue;
			int T = shared + 2 * ( totaldist - shared );
			ways = ( (ncr(T,totaldist - shared) * ncr(T - (totaldist - shared), shared))%mod * ncr(k,T)) % mod;
 			ways2 = (fac[totaldist] * s[n][totaldist]) % mod;
			ways2 = (ways2 * ways2) % mod;
			val = powmod(shared,n*(m-2),mod);
			val = (val * ways) % mod;
			fans = (val*ways2 + fans) % mod;
		}

	}

	if(m==2){
		for(int x = 1; 2 * x <= k; ++x){
			if(x>n) break;
			val = (ncr(k , x) * ncr(k - x, x)) % mod;
			ways = (fac[x] * s[n][x]) % mod;
			ways = (ways * ways) % mod;
			fans = (fans + ways * val) % mod;
		}
	}

	cout << fans << endl;

	return 0;
}

#include <map>
#include <set>
#include <stack>
#include <cmath>
#include <queue>
#include <vector>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>

using namespace std;

const int max_n = 1111, max_k = 1111111, mod = 1000000007;

int n, m, k, dp[max_n][max_n], f[max_k], rf[max_k];

long long power(long long x, long long y, long long mod) {
    if (y == 0) {
        return 1 % mod;
    }
    if (y % 2 == 0) {
        return power((x * x) % mod, y / 2, mod);
    }
    return (x * power(x, y - 1, mod)) % mod;
}

int get_c(int n, int k) {
    return (1LL * ((1LL * f[n] * rf[k]) % mod) * rf[n - k]) % mod;
}

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    cin >> n >> m >> k;
    if (m == 1) {
        cout << power(k, n, mod) << endl;
        return 0;
    }
    for (int i = 1; i <= n; ++i) {
        dp[i][1] = 1;
        for (int j = 2; j <= i; ++j) {
            dp[i][j] = (1LL * dp[i - 1][j] * j + dp[i - 1][j - 1]) % mod;
        }
    }
    f[0] = 1;
    rf[0] = 1;
    for (int i = 1; i < max_k; ++i) {
        f[i] = (1LL * f[i - 1] * i) % mod;
        rf[i] = power(f[i], mod - 2, mod);
    }
    int ans = 0;
    for (int y = 1; y <= n; ++y) {
        for (int x = 0; x <= y; ++x) {
            if (2 * y - x <= k) {
                int pl = get_c(k, 2 * y - x);
                pl = (1LL * pl * get_c(2 * y - x, y - x)) % mod;
                pl = (1LL * pl * get_c(y, x)) % mod;
                pl = (1LL * pl * power(x, n * (m - 2), mod)) % mod;
                pl = (1LL * pl * dp[n][y]) % mod;
                pl = (1LL * pl * dp[n][y]) % mod;
                pl = (1LL * pl * f[y]) % mod;
                pl = (1LL * pl * f[y]) % mod;
                //cout << y << " " << x << "  +=  " << pl << endl;
                ans = (ans + pl) % mod;
            }
        }
    }
    cout << ans << endl;
    return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <cstdio>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <string.h>
#include <cassert>

using namespace std;

#define GI ({int t;scanf("%d",&t);t;})
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define sz size()
#define INF (int)1e9
#define EPS LD(1e-9)
#define DINF LD(1e50)
#define MOD LL(1000000007)

typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int> > VVI;
typedef pair<int,int> PII;
typedef double LD;

const int mn=1003, mk=1000006;
int m,n,k;
LL ncolors[mn], fact[mk], invfact[mk];

LL power(LL a,LL b){
	if(!b)	return 1;
	if(b&1)	return a*power(a,b-1)%MOD;
	else{
		LL v=power(a,b>>1);
		return v*v%MOD;
	}
}

#define inverse(a) (power(a,MOD-2))

LL choose(LL n,LL r){
	LL num=fact[n];
	LL den=invfact[r]*invfact[n-r]%MOD;
	return num*den%MOD;
}

int main(){

	fact[0]=invfact[0]=1;
	FOR(i,1,mk){
		fact[i]=(i*fact[i-1])%MOD;
		invfact[i]=inverse(fact[i]);
	}
	m=GI, n=GI, k=GI;
	ncolors[0]=0;
	FOR(i,1,mn){
		ncolors[i]=power(i,m);
		for(int j=i-1;j>=0;j--){
			LL toadd=(choose(i,j)*ncolors[j])%MOD;
			toadd=(MOD-toadd)%MOD;
			(ncolors[i]+=toadd)%=MOD;
		}
	}
	if(n==1)	{cout<<power(k,m)<<endl;return 0;}
	LL ans=0;
	int to=min(m,k);
	REP(common,to+1)	REP(different,to+1){
		int used=common+2*different;
		if(used<1 || used>k || common+different>m)	continue;
		LL toadd=choose(k,common)*choose(k-common,different)%MOD*choose(k-common-different,different)%MOD;
		(toadd*=ncolors[common+different]*ncolors[common+different]%MOD)%=MOD;
		(toadd*=power(common,m*(n-2)))%=MOD;
		(ans+=toadd)%=MOD;
	}
	cout<<ans<<endl;
	return 0;
}

//lxrtxdy!
//当m>2时，划分线从右向左移动中，cnt(L')<=cnt(L),cnt(R')>=cnt(R)
//由于cnt(L)==cnt(R),cnt(L')==cnt(R')
//则cnt(L)==cnt(R)==cnt(L')==cnt(R')

//枚举cnt(L)大小，枚举交集大小，组合数求出颜色集合数*方案数（左侧放置方案数*右侧放置方案数*中间交集放置方案数）
//单侧放置方案数要求每个颜色至少出现一次，为点指定颜色，则为：盒子不同，球不同，不可空，放置方案数。好像是S2*m！
//似乎也可以给每个颜色钦定一个格子，剩下的随意定色，方案数乘起来也行？//并不行会重复乖乖s2吧

//中间交集放置方案数为|S|^((m-2)*n)

//组合数C(x,y)中y很大，但是x很小，预处理x阶乘及其逆元
//y!/(y-x)!==(y-x)*(y-x+1)*(y-x+2)*...*y;
//预处理一定长度的的k的阶乘的后缀，用线段树/逆元+后缀积 维护一下
//n^3先看看对不对再说吧，手玩了个2 3 3好像对了，3 3 3 输出2055这咋手玩啊
//n^2logn x
//n^3爬了

#include <iostream>
using namespace std;
typedef long long ll;
#define int ll
const int kmaxn=1e5;
const int kmaxm=4e3+5;
const int M=1e9+7;

int fac[kmaxn],finv[kmaxn];
int S2[kmaxm][kmaxm];
int suf[kmaxn],sinv[kmaxn];
int MAX;
int n,m,k;
int mpow(int b,int p)
{
	int ans=1;
	while(p)
	{
		if(p&1)
		{
			ans*=b;
			ans%=M;
		}
		p>>=1;
		b*=b;
		b%=M;
	}
	return ans;
}
void init()
{
    fac[0] = 1;
    for(int i = 1; i <= MAX; i++)
        fac[i] = (fac[i - 1] * i) % M;
    finv[MAX] = mpow(fac[MAX], M - 2);
    for(int i = MAX - 1; i >= 0; i--)
        finv[i] = (finv[i + 1] * (i + 1)) % M;
    int tp=max(n,m);
    S2[0][1]=1;
	for(int i=1;i<=tp;++i)
	{
		for(int j=1;j<=i;++j)
		{
			S2[i][j]=S2[i-1][j]*j%M+S2[i-1][j-1];
			S2[i][j]%=M;
		}
	}
	suf[0]=sinv[0]=1;
	tp=k;
	for(int i=1;i<=MAX;++i,--tp)
	{
		suf[i]=suf[i-1]*tp%M;
		sinv[i]=mpow(suf[i],M-2);
	}
}
int cal(int y,int x)
{
//	cout<<"cal	"<<y<<' '<<x<<endl;
	int ans=1;
	ans=suf[k-(y-x)]*sinv[k-y]%M;
	return ans;
	while(x--)
	{
		ans*=y;
		--y;
		ans%=M;
	}
	return ans;
}
int C(int x,int y)//y中选x个
{
//	cout<<"C	"<<x<<' '<<y<<' '<<finv[x]<<endl;
	return cal(y,x)*finv[x]%M;
}
int S(int x,int y)
{
	return S2[x][y];//x个球，y个盒子
}
int solve(int s,int t)//并集大小 ，cnt(L)大小
{
//	cout<<"solve	all "<<t<<' '<<s<<endl;
	int q=t-s;
	int mcnt=C(s,k);
	int lcnt=C(q,k-s);
	int rcnt=C(q,k-s-q);
	int lway=S(n,t)*fac[t]%M,rway=S(n,t)*fac[t]%M;
	int mway=mpow(s,n*(m-2));
//	cout<<mcnt<<' '<<lcnt<<' '<<rcnt<<' '<<lway<<' '<<rway<<' '<<mway<<endl;
//	cout<<"tst "<<<<S(n,t)
	return mcnt%M*lcnt%M*rcnt%M*lway%M*rway%M*mway%M;
}

void brute()
{
	int ans=0,cnt=0,way=0;
	for(int i=1;i<=n;++i)
	{
		cnt=C(i,k);
		way=S(n,i)*fac[i]%M;;
		if(m!=1)
			ans+=cnt*cnt%M*way%M*way%M;
		else
			ans+=cnt*way%M;
		ans%=M;
	}
	cout<<ans<<endl;
}

void work()
{
	MAX=max(n,m)*4;
	init();
	if(m<=2)
	{
		brute();
		return;
	}
	int ans=0,tp;
	for(int i=1;i<=n;++i)//cnt(L)
	{
		for(int s=1;s<=i;++s)//交集大小
		{
			tp=solve(s,i);
//			cout<<i<<' '<<s<<' '<<tp<<endl;
			ans+=tp;
			ans%=M;
		}
	}
	cout<<ans<<endl;
	return;
	while(1)
	{
		int x,y;
		cin>>x>>y;
		cout<<mpow(x,M-2)*y%M<<endl;
	}
}
signed main()
{
	(cin>>n>>m>>k);
	{
		work();
	}
	return 0;
}
//orzlxr!//hello

#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define mod 1000000007
#define int long long
#define ll long long
#define EPS 0.00000000000001
#define ld long double
#define inf 1000000007
#define N 1000000

const double PI=acos(-1.0);
namespace fft
{
    struct num
    {
        double x,y;
        num() {x=y=0;}
        num(double x,double y):x(x),y(y){}
    };
    inline num operator+(num a,num b) {return num(a.x+b.x,a.y+b.y);}
    inline num operator-(num a,num b) {return num(a.x-b.x,a.y-b.y);}
    inline num operator*(num a,num b) {return num(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}
    inline num conj(num a) {return num(a.x,-a.y);}

    int base=1;
    vector<num> roots={{0,0},{1,0}};
    vector<int> rev={0,1};
    const double PI=acosl(-1.0);

    void ensure_base(int nbase)
    {
        if(nbase<=base) return;
        rev.resize(1<<nbase);
        for(int i=0;i<(1<<nbase);i++)
            rev[i]=(rev[i>>1]>>1)+((i&1)<<(nbase-1));
        roots.resize(1<<nbase);
        while(base<nbase)
        {
            double angle=2*PI/(1<<(base+1));
            for(int i=1<<(base-1);i<(1<<base);i++)
            {
                roots[i<<1]=roots[i];
                double angle_i=angle*(2*i+1-(1<<base));
                roots[(i<<1)+1]=num(cos(angle_i),sin(angle_i));
            }
            base++;
        }
    }

    void fft(vector<num> &a,int n=-1)
    {
        if(n==-1) n=a.size();
        assert((n&(n-1))==0);
        int zeros=__builtin_ctz(n);
        ensure_base(zeros);
        int shift=base-zeros;
        for(int i=0;i<n;i++)
            if(i<(rev[i]>>shift))
                swap(a[i],a[rev[i]>>shift]);
        for(int k=1;k<n;k<<=1)
        {
            for(int i=0;i<n;i+=2*k)
            {
                for(int j=0;j<k;j++)
                {
                    num z=a[i+j+k]*roots[j+k];
                    a[i+j+k]=a[i+j]-z;
                    a[i+j]=a[i+j]+z;
                }
            }
        }
    }

    vector<num> fa,fb;

    vector<int> multiply(vector<int> &a, vector<int> &b)
    {
        int need=a.size()+b.size()-1;
        int nbase=0;
        while((1<<nbase)<need) nbase++;
        ensure_base(nbase);
        int sz=1<<nbase;
        if(sz>(int)fa.size()) fa.resize(sz);
        for(int i=0;i<sz;i++)
        {
            int x=(i<(int)a.size()?a[i]:0);
            int y=(i<(int)b.size()?b[i]:0);
            fa[i]=num(x,y);
        }
        fft(fa,sz);
        num r(0,-0.25/sz);
        for(int i=0;i<=(sz>>1);i++)
        {
            int j=(sz-i)&(sz-1);
            num z=(fa[j]*fa[j]-conj(fa[i]*fa[i]))*r;
            if(i!=j) fa[j]=(fa[i]*fa[i]-conj(fa[j]*fa[j]))*r;
            fa[i]=z;
        }
        fft(fa,sz);
        vector<int> res(need);
        for(int i=0;i<need;i++) res[i]=fa[i].x+0.5;
        return res;
    }

    vector<int> multiply_mod(vector<int> &a,vector<int> &b,int m,int eq=0)
    {
        int need=a.size()+b.size()-1;
        int nbase=0;
        while((1<<nbase)<need) nbase++;
        ensure_base(nbase);
        int sz=1<<nbase;
        if(sz>(int)fa.size()) fa.resize(sz);
        for(int i=0;i<(int)a.size();i++)
        {
            int x=(a[i]%m+m)%m;
            fa[i]=num(x&((1<<15)-1),x>>15);
        }
        fill(fa.begin()+a.size(),fa.begin()+sz,num{0,0});
        fft(fa,sz);
        if(sz>(int)fb.size()) fb.resize(sz);
        if(eq) copy(fa.begin(),fa.begin()+sz,fb.begin());
        else
        {
            for(int i=0;i<(int)b.size();i++)
            {
                int x=(b[i]%m+m)%m;
                fb[i]=num(x&((1<<15)-1),x>>15);
            }
            fill(fb.begin()+b.size(),fb.begin()+sz,num{0,0});
            fft(fb,sz);
        }
        double ratio=0.25/sz;
        num r2(0,-1),r3(ratio,0),r4(0,-ratio),r5(0,1);
        for(int i=0;i<=(sz>>1);i++)
        {
            int j=(sz-i)&(sz-1);
            num a1=(fa[i]+conj(fa[j]));
            num a2=(fa[i]-conj(fa[j]))*r2;
            num b1=(fb[i]+conj(fb[j]))*r3;
            num b2=(fb[i]-conj(fb[j]))*r4;
            if(i!=j)
            {
                num c1=(fa[j]+conj(fa[i]));
                num c2=(fa[j]-conj(fa[i]))*r2;
                num d1=(fb[j]+conj(fb[i]))*r3;
                num d2=(fb[j]-conj(fb[i]))*r4;
                fa[i]=c1*d1+c2*d2*r5;
                fb[i]=c1*d2+c2*d1;
            }
            fa[j]=a1*b1+a2*b2*r5;
            fb[j]=a1*b2+a2*b1;
        }
        fft(fa,sz);fft(fb,sz);
        vector<int> res(need);
        for(int i=0;i<need;i++)
        {
            ll aa=fa[i].x+0.5;
            ll bb=fb[i].x+0.5;
            ll cc=fa[i].y+0.5;
            res[i]=(aa+((bb%m)<<15)+((cc%m)<<30))%m;
        }
        return res;
    }
    vector<int> square_mod(vector<int> &a,int m)
    {
        return multiply_mod(a,a,m,1);
    }
};//end copied part;

int fact[N+1],ifact[N+1];
ll fastexpom(ll a,ll b,ll m)
{
    ll res=1;
      while(b>0)
      {
        if(b%2==1)
          res=(((res)%m)*((a)%m))%m;
        a=(((a)%m)*((a)%m))%m;
        b/=2;
      }
      return res;
}
ll modinv(ll a, ll m=1000000007)
{
  return fastexpom(a,m-2,m);
}

int nCr(int n,int r)
{
    if(n == 0 and r == 0)
        return 1;
    if(r > n or r < 0 or n == 0)
        return 0;
    int ans = (fact[n] * ifact[n-r])%mod;
    ans = (ans * ifact[r])%mod;
    return ans;
}

void preprocess()
{
    fact[0] = 1;
    ifact[0] = 1;
    for(int i = 1;i <= N;i++)
    {
        fact[i] = (fact[i-1] * i)%mod;
        ifact[i] = modinv(fact[i]);
    }

}

int stirling_number(int n,int k)
{
    int ans = 0;
    for(int i = 0;i <= k;i++)
    {
        if(i & 1)
            ans = ans - (nCr(k,i) * fastexpom((k - i),n,mod))%mod;
        else
            ans = ans + (nCr(k,i) * fastexpom((k - i),n,mod))%mod;
        ans += mod;
        if(ans >= mod)
            ans -= mod;
    }
    return ans;
}

int32_t main()
{
    IOS;
    #ifndef ONLINE_JUDGE
    freopen("int.txt","r",stdin);
    freopen("out.txt","w",stdout);
    #endif
    preprocess();

    int n,m,k;
    cin >> n >> m >> k;
    if(m == 1)
    {
    	cout << fastexpom(k,n,mod) << endl;
    	return 0;
    }
    vector<int> a(min(2*n + 1,k + 1));
    vector<int> b(min(2*n + 1,k + 1));
    for(int i = 0;i <= k and i <= 2*n;i++)
    {
        if(i & 1)
            a[i] = -ifact[i];
        else
            a[i] = ifact[i];
        b[i] = (fastexpom(i,n,mod) * ifact[i])%mod;
    }
    vector<int> dp = fft::multiply_mod(a,b,mod);
    int ans = 0;

    for(int i = 1;i <= k and i <= 2*n;i++)
    {

        for(int common = 0;common <= i;common++)
        {

            if(2 * i - common > k and m > 2)
                continue;
            int l1 = (dp[i] * fact[i])%mod;
            int l2 = (dp[i] * fact[i])%mod;
            l1 = l1 * nCr(k - common,i - common)%mod;
            l2 = (l2 * nCr(k - i,i - common))%mod;
            int lans = nCr(k,common);
            lans = (lans * l1)%mod;
            lans = (lans * l2)%mod;
            if(m >= 2)
            {
                if(m >= 2)
                    lans = (lans * fastexpom(common,n * (m - 2),mod))%mod;
            }
            ans = ans + lans;
            if(ans >= mod)
                ans -= mod;
        }

    }
    cout << ans;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define die(x) return cout << x << endl, 0
#define all(o) o.begin(), o.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0)
#define FILE freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define SZ(x) ((int)(x).size())
typedef long double ld;
typedef long long ll;
int gcd(int x,int y){ return (!y ? x : gcd(y, x%y)); }
int to_int(string sconvert){stringstream geek(sconvert);int xconvert = 0; geek >> xconvert; return xconvert;}
const int MAXN=2e3+30,MAX_LOG=40,MOD=1e9+7,INF=1e9;
const double PI = acos(-1);
int mod(int x) { return (x % MOD + MOD) % MOD; }
int power(int x,int y){
    if(y==0)return 1;
    int c=power(x,y/2);
    c=(c*c)%MOD;
    if(y%2)c=(c*x)%MOD;
    return c;
}
int n,m,k,ans;
int dp[MAXN][MAXN];
int fact[MAXN*MAXN];
int C(int a,int b){
    if(a>b || a<0)return 0;
    return (fact[b]*power((fact[a]*fact[b-a])%MOD,MOD-2)%MOD)%MOD;
}
int MAIN(){
    cin>>n>>m>>k;
    if(m==1)die(power(k,n));
    fact[0]=1;
    for(int i=1;i<MAXN*MAXN;i++)fact[i]=(fact[i-1]*i)%MOD;
    dp[0][0]=1;
    for(int i=1;i<MAXN;i++){
        for(int j=1;j<=i;j++)dp[i][j]=((dp[i-1][j]*j)%MOD+dp[i-1][j-1])%MOD;
    }
    //cout<<dp[2][2]<<" "<<fact[3]<<endl;
    for(int x=1;x<=min(n,k);x++){
        for(int y=0;y<=x;y++){
            if(2*x-y>k)continue;
            int cnt=((C(2*x-y,k)*C(x-y,2*x-y))%MOD*C(x-y,x))%MOD;
            cnt%=MOD;
            cnt=(((((cnt*power(y,n*(m-2)))%MOD)*((dp[n][x]*dp[n][x])%MOD))%MOD)*((fact[x]*fact[x])%MOD))%MOD;

            ans=(ans+cnt)%MOD;
           // cout<<cnt<<" "<<x<<" "<<y<<" "<<ans<<endl;
        }
    }
    cout<<ans;
    return 0;
}
int32_t main(){
    IOS;
    int t=1;
    //cin>>t;
    while(t--)MAIN();
    return 0;
}

#include<stdio.h>
#define N 1010
#define P 1000000007
int n,m,k;
long long nCk[N*2][N*2]={1},chk[N*2][N*2],color[N*N];
long long top[N]={1},mid[N],ans,tot[N],sin[N];

long long bex(int x,int y){
    long long total,temp;
    if(y<=0)return 1;
    if(y==1)return x;

    temp=bex(x,y/2);
    if(y%2)total=x;
    else total=1;
    total=(total*temp)%P;
    total=(total*temp)%P;
    return total;
}
int g(int x){
    int i;

    if(x==2)return 1;
    if(x%2==0)return 0;
    for(i=3;i*i<=x;i++){
        if(x%i==0)return 0;
    }
    return 1;
}
int main(void){
    int i,j,li,I,J,K,KK,conut=0,S;
    long long A,temp,T;

    //freopen("input.txt","r",stdin);
    scanf("%d %d %d",&n,&m,&k);

    //�Ҽ�2~1000
    for(i=2;i<N;i++){
        if(g(i)==1)sin[++conut]=i;
    }
    //nCk
    for(i=1;i<N;i++){
        nCk[i][0]=1;
        for(j=1;j<=i;j++){
            nCk[i][j]=nCk[i-1][j-1]+nCk[i-1][j];
            nCk[i][j]%=P;
        }
    }
    //color
    for(i=1;i<N;i++){
        S=1;
        for(j=2;j<=i;j++){
            temp=j;
            for(K=1;K<=conut && sin[K]<=temp;K++){
                while(temp%sin[K]==0){
                    temp/=sin[K];
                    tot[K]++;
                }
            }
        }
        for(j=k-i+1;j<=k;j++){
            temp=j;
            for(K=1;K<=conut;K++){
                while(temp%sin[K]==0){
                    if(tot[K]==0)break;
                    temp/=sin[K];
                    tot[K]--;
                }
            }
            S=(S*temp)%P;
        }
        color[i]=S;
    }

    //top
    for(i=1;i<=n && i<=k;i++){
        top[i]=bex(i,n);
        for(j=i-1;j>0;j--){
            top[i]-=(nCk[i][j]*top[j])%P;
            if(top[i]<0)top[i]+=P;
        }
    }
    //mid
    if(m==2)mid[0]=1;
    else if(m==1){
        for(i=1;i<=n;i++){
            ans+=top[i]*color[i];
            ans%=P;
        }
        printf("%d",ans);
        return 0;
    }
    for(i=0;i<=n;i++){
        mid[i]=bex(i,n*m-n-n);
    }
    //btm
    for(i=n;i>0;i--){
        for(j=0;j<=i;j++){
            temp=nCk[i][j];
            K=k-i;
            I=i-j;
            S=1;
            if(i==n){
                /*for(J=1;J<=I;J++){
                    S=(S*(K-I+J))/J;
                    S%=P;
                }*/
                for(J=2;J<=I;J++){
                    T=J;
                    for(KK=1;KK<=conut && sin[KK]<=T;KK++){
                        while(T%sin[KK]==0){
                            T/=sin[KK];
                            tot[KK]++;
                        }
                    }
                }
                for(J=K-I+1;J<=K;J++){
                    T=J;
                    for(KK=1;KK<=conut;KK++){
                        while(T%sin[KK]==0){
                            if(tot[KK]==0)break;
                            T/=sin[KK];
                            tot[KK]--;
                        }
                    }
                    S=(S*T)%P;
                }
                chk[i][I]=S;
            }
            else{
                chk[i][I]=(chk[i+1][I-1]+chk[i+1][I])%P;
                S=chk[i][I];
            }
            temp=(temp*S)%P;
            temp=(temp*mid[j])%P;
            temp=(temp*color[i])%P;
            temp=(temp*top[i])%P;
            temp=(temp*top[i])%P;
            ans+=temp;
            ans%=P;
        }
    }
    printf("%lld",ans);
}

#include<bits/stdc++.h>
using namespace std;

#define sd(mark) scanf("%d",&mark)
#define ss(mark) scanf("%s",&mark)
#define sl(mark) scanf("%lld",&mark)
#define debug(mark) printf("check%d\n",mark)
#define clr(mark) memset(mark,0,sizeof(mark))
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define ll long long
#define mod 1000000007
#define N 1000010
ll dp[N];
ll fact[N],inv[N];
ll pow1(ll a,ll b)
{
	if(b==0)	return 1;
	ll ret=pow1(a,b/2);
	ret=(ret*ret)%mod;
	if(b&1)	ret=(a*ret)%mod;
	return ret;
}
ll C(ll n,ll r)
{
	if(n<r || n<0 || r<0)
		return 0;
	ll ret=fact[n]*inv[r]%mod;
	return ret*inv[n-r]%mod;
}
int main()
{
	int n,m,i,j,k;
	sd(n);sd(m);sd(k);
	if(m==1)
		return 0*printf("%lld\n",pow1(k,n));
	// for(i=0;i<N;++i)
	// 	clr(C[i]);
	// C[0][0]=1;
	// for(i=1;i<N;++i)
	// {
	// 	C[i][0]=C[i][i]=1;
	// 	for(j=1;j<i;++j)
	// 		C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
	// }
	fact[0]=1;
	for(i=1;i<N;++i)
		fact[i]=fact[i-1]*i%mod;
	for(i=0;i<N;++i)
		inv[i]=pow1(fact[i],mod-2);
	dp[0]=0;
	dp[1]=1;
	for(i=2;i<=n;++i)
	{
		dp[i]=pow1(i,n);
		for(j=1;j<i;++j)
			dp[i]=(dp[i]-C(i,j)*dp[j]%mod+mod)%mod;
	}
	ll ans=0;
	for(i=0; i<=n && i*2 <= k;++i)
	{
		for(j=0;i+j<=n && i*2+j <= k;++j)
		{
			ll temp=C(k,i)*C(k-i,i)%mod;
			temp=temp*C(k-2*i,j)%mod;
			temp=temp*dp[i+j]%mod;
			temp=temp*dp[i+j]%mod;
			temp=temp*pow1(j,n*(m-2))%mod;
			ans=(ans+temp)%mod;
			//cout<<i<<' '<<j<<' '<<temp<<'\n';
		}
	}
	printf("%lld\n",ans);
	//cout<<dp[2]<<'\n';
}

#include <cstdio>
#include <algorithm>
#include <iostream>
#define MAXD 1009
#define MAXG 2009
#define MAXK 1000009

using namespace std;

typedef long long ll;

const ll MOD = 1000000007;

ll dc[MAXG][MAXD], fact[MAXK], d[MAXD];

ll mod (ll a)
{
    return (a % MOD + MOD) % MOD;
}

ll n, m, k;

ll power (ll a, ll b)
{
    ll res = 1, cur = a;
    while (b > 0)
    {
        if (b % 2)
        {
            res *= cur;
            res = mod(res);
        }
        b /= 2;
        cur *= cur;
        cur = mod(cur);
    }
    return res;
}

void init()
{
    for (ll i = 0; i < MAXG; i++)
    {
        for (ll j = 0; j < MAXD; j++)
        {
            dc[i][j] = -1;
        }
    }
    fact[0] = 1;
    for (ll i = 1; i < MAXK; i++)
    {
        fact[i] = fact[i - 1] * i;
        fact[i] = mod(fact[i]);
    }
}

ll inv (ll a)
{
    return power(a, MOD - 2);
}

ll c (ll n, ll k)
{
    if (dc[n][k] == -1)
    {
        if (n == k || k == 0)
            return dc[n][k] = 1;
        return dc[n][k] = mod(c(n - 1, k - 1) + c(n - 1, k));
    }
    return dc[n][k];
}

int main()
{
    cin >> n >> m >> k;
    ll ans = 0, t, p;
    init ();
    for (ll i = 1; i < MAXD; i++)
    {
        d[i] = power(i, n);
        for (ll j = 1; j < i; j++)
        {
            d[i] -= mod(d[j] * c(i, j));
            d[i] = mod(d[i]);
        }
    }
    if (m == 1)
    {
        cout << power(k, n);
        return 0;
    }
    for (ll x = 0; x <= n; x++)
    {
        for (ll y = 0; 2 * x + y <= k; y++)
        {
            if (x + y > n)
                break;
            if (x == 0 && y == 0)
                continue;
            t = c(2 * x + y, y) * c(2 * x, x);
            t = mod(t);
            t *= fact[k];
            t = mod(t);
            p = mod(fact[2 * x + y] * fact[k - 2 * x - y]);
            t *= inv(p);
            t = mod(t);
            t *= power(y, n * (m - 2));
            t = mod(t);
            t *= mod(d[x + y] * d[x + y]);
            t = mod(t);
            ans += t;
            ans = mod(ans);
        }
    }
    cout << mod(ans);
    return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define mst(a,x) memset(a,x,sizeof(a))
using namespace std;

const ll MOD = 1e9 + 7;
const int N  = 2005;
ll dp[N][N], ans, Ck[N], c[N][N], fac[N];
int n, m, k;

ll qpow(ll x, int p)
{
	ll ret = 1;

	while(p)
	{
		if(p & 1) ret = ret * x % MOD;
		x = x * x % MOD;
		p >>= 1;
	}
	return ret;
}

void add(ll &x, ll y)
{
	x += y;
	if(x >= MOD) x -= MOD;
}

int main()
{
	ll tmp, mid;

	c[0][0] = 1;
	for(int i = 1; i < N; i++)
	{
		c[i][0] = 1;
		for(int j = 1; j <= i; j++) c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
	}
	fac[0] = 1;
	for(int i = 1; i < N; i++) fac[i] = fac[i - 1] * i % MOD;
	scanf("%d%d%d", &n, &m, &k);
	Ck[0] = 1;
	for(int i = 1; i <= min(2 * n, k); i++) Ck[i] = Ck[i - 1] * (k - i + 1) % MOD * qpow(i, MOD - 2) % MOD;
	dp[0][0] = 1;
	for(int i = 0; i < n; i++)
		for(int j = 0; j <= min(i, k); j++)
		{
			if(!dp[i][j]) continue;
			add(dp[i + 1][j], dp[i][j] * j % MOD);
			add(dp[i + 1][j + 1], dp[i][j]);
		}
	if(m == 1)
	{
		cout << qpow(k, n) << "\n";
	}
	else
	{
		ans = 0;
		for(int a = 0; a <= min(n, k); a++)
			for(int b = 0; a + b <= min(n, k) && a + b + b <= k; b++)
			{
				tmp = fac[a + b] * fac[a + b] % MOD * Ck[a + b + b] % MOD;
				tmp = tmp * c[a + b + b][a] % MOD * c[b + b][b] % MOD;
				if(!a)
				{
					if(m == 2) mid = 1;
					else mid = 0;
				}
				else mid = qpow(a, n * m - 2 * n);
				add(ans, tmp * dp[n][a + b] % MOD * dp[n][a + b] % MOD * mid % MOD);
			}
		cout << ans << "\n";
	}
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

template<int m>
struct modint {

	unsigned x;

	modint() : x(0) {}

	modint(long long arg) {
		arg %= m;
		if (arg < 0) {
			x = arg + m;
		} else {
			x = arg;
		}
	}

	modint& operator+= (const modint& other) {
		x += other.x;
		if (x >= m) {
			x -= m;
		}
		return *this;
	}

	modint& operator*= (const modint& other) {
		x = (x * 1ull * other.x) % m;
		return *this;
	}

	modint& operator-= (const modint& other) {
		x += m - other.x;
		if (x >= m) {
			x -= m;
		}
		return *this;
	}

	modint operator+ (const modint& other) const {
		modint tmp = *this;
		tmp += other;
		return tmp;
	}

	modint operator- (const modint& other) const {
		modint tmp = *this;
		tmp -= other;
		return tmp;
	}

	modint operator* (const modint& other) const {
		modint tmp = *this;
		tmp *= other;
		return tmp;
	}

	explicit operator int () const {
		return x;
	}

	modint& operator++ () {
		++x;
		if (x == m) {
			x = 0;
		}
		return *this;
	}

	modint& operator-- () {
		if (x == 0) {
			x = m-1;
		} else {
			--x;
		}
		return *this;
	}

	modint operator++ (int) {
		modint tmp = *this;
		++*this;
		return tmp;
	}

	modint operator-- (int) {
		modint tmp = *this;
		--*this;
		return tmp;
	}

	bool operator== (const modint& other) const {
		return x == other.x;
	}

	bool operator!= (const modint& other) const {
		return x != other.x;
	}

	template<class T>
	modint operator^ (T arg) const {
		if (arg == 0) {
			return 1;
		}
		if (arg == 1) {
			return x;
		}
		auto t = *this ^ (arg >> 1);
		t *= t;
		if (arg & 1) {
			t *= *this;
		}
		return t;
	}

	template<class T>
	modint operator^= (T arg) {
		return *this = *this ^ arg;
	}

	modint inv() const {
		return *this ^ (m-2);
	}
};

const int MOD = 1'000'000'007;
typedef modint<MOD> mint;

mint f[1000005], finv[1000005];

mint bk(int n, int k) {
	if (n < 0 || k < 0 || n-k < 0)
		return 0;
	return f[n]	* finv[k] * finv[n-k];
}

mint tacnoboja(int n, int k) {
	mint z = 0;
	for (int i=1; i<=k; i++) {
		mint t = (mint(i) ^ n) * bk(k, i);
		if ((k-i) % 2)
			z -= t;
		else
			z += t;
	}
	return z;
}

int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	cerr.tie(nullptr);

	f[0] = finv[0] = 1;
	for (int i=1; i<1000005; i++) {
		f[i] = f[i-1] * i;
		finv[i] = f[i].inv();
	}

	int n, m, k;
	cin >> m >> n >> k;

	mint sol;

	if (n == 1) {
		sol = mint(k) ^ m;
	} else {
		for (int d=1; d<=m; d++) {
			mint tb = tacnoboja(m, d);
			for (int p=0; p<=d; p++) {
				sol += tb*tb*bk(k, p)*bk(k-p, d-p)*bk(k-d, d-p)
					*(mint(p)^(n-2)*m);
			}
		}
	}

	cout << (int)sol << '\n';
}

#include <iostream>
#include <sstream>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <complex>
#include <ctime>
#include <cstring>
#include <cassert>

typedef long long LL;
typedef long double LD;

using namespace std;

const int MOD = (int)(1e9) + 7;

const int MAX_N = (int)1e3 + 10;
const int MAX_K = (int)1e6 + 10;

int n, m, k;
int f [MAX_N][MAX_N];
int bin [MAX_N][MAX_N];
int prodHigh [2 * MAX_N][2 * MAX_N];
int prod [2 * MAX_N][2 * MAX_N];

int power(int base, int ind) {
    LL cur = base, res = 1;
    for (; ind != 0; ind >>= 1) {
        if (ind & 1) res = (res * cur) % MOD;
        cur = (cur * cur) % MOD;
    }
    return res;
}

int a [10][10];
int used [10];
int bruteAns;

int pw [1010];

void brute(int i, int j) {
#ifdef DBGDBG
    cerr << "brute " << i << ' ' << j << '\n';
#endif

    if (i == n) {
        bool ok = true;
        for (int k = 0; k + 1 < m; k++) {
            int left = 0, right = 0;

            memset(used, 0, sizeof(used));
            for (int s = 0; s < n; s++)
                for (int f = 0; f <= k; f++) {
                    if (!used[a[s][f]])
                        left++;
                    used[a[s][f]] = true;
                }

            memset(used, 0, sizeof(used));
            for (int s = 0; s < n; s++)
                for (int f = k + 1; f < m; f++) {
                    if (!used[a[s][f]])
                        right++;
                    used[a[s][f]] = true;
                }

            if (left != right) {
                ok = false;
                break;
            }
        }
        if (ok) {bruteAns++;

        /*for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++)
                cerr << a[i][j] << ' ';
            cerr << '\n';
        }*/}

        return;
    }

    for (int c = 0; c < k; c++) {
        a[i][j] = c;
        if (j + 1 < m)
            brute(i, j + 1);
        else
            brute(i + 1, 0);
    }
}

int main() {
    cin >> n >> m >> k;

    if (m == 1) {
        int ans = 1;
        for (int i = 1; i <= n; i++)
            ans = (ans * (LL)k) % MOD;
        cout << ans << '\n';
        return 0;
    }

    f[0][0] = 1;
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= i; j++)
            f[i][j] = (f[i - 1][j - 1] + f[i - 1][j] * (LL)j) % MOD;

    for (int i = 0; i <= n; i++)
        bin[i][i] = bin[i][0] = 1;
    for (int i = 1; i <= n; i++)
        for (int j = 1; j < i; j++)
            bin[i][j] = (bin[i - 1][j] + bin[i - 1][j - 1]) % MOD;

    for (int i = 1; i <= n; i++) {
        prod[i][i] = i;
        for (int j = i + 1; j <= n; j++)
            prod[i][j] = (prod[i][j - 1] * (LL)j) % MOD;
    }

    for (int i = 1; i <= 2 * n; i++)
        prodHigh[i][i - 1] = prod[i][i - 1] = 1;
    for (int i = 0; i <= 2 * n; i++) {
        prodHigh[i][i] = k - i;
        for (int j = i + 1; j <= 2 * n; j++)
            prodHigh[i][j] = (prodHigh[i][j - 1] * (LL)(k - j)) % MOD;
    }

    for (int r = 0; r <= n; r++)
        pw[r] = power(r, n * (m - 2))  % MOD;

    int ans = 0;
    for (int i = 1; i <= n; i++) {
        int cur = (f[n][i] * (LL)prodHigh[0][i - 1]) % MOD;
        int ways = 0;
        for (int r = 0; r <= i; r++)
            if (k >= 2 * i - r) {
#ifdef DBG
                cerr << "i r " << i << ' ' << r << '\n';
#endif
                int add = bin[i][r];
#ifdef DBG
                cerr << add << '\n';
#endif
                add = (add * (LL)prodHigh[i][2 * i - r - 1]) % MOD;
#ifdef DBG
                cerr << add << '\n';
#endif
                add = (add * (LL)prod[i - r + 1][i]) % MOD;
#ifdef DBG
                cerr << add << '\n';
#endif
                add = (add * (LL)pw[r]) % MOD;//(LL)power(r, n * (m - 2))) % MOD;
#ifdef DBG
                cerr << add << '\n';
#endif
                add = (add * (LL)f[n][i]) % MOD;
                ways = (ways + add) % MOD;
            }
        cur = (cur * (LL)ways) % MOD;
        ans = (ans + cur) % MOD;
#ifdef DBG
        cerr << "ans " << ans << '\n';
#endif
    }

    cout << ans << '\n';
#ifdef DBG
    brute(0, 0);
    //assert(brute == ans);
    cerr << bruteAns << '\n';
#endif
    return 0;

#ifdef TIME
    cerr << (double)clock() << '\n';
#endif
}

#include <iostream>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
int n,m,k;
int dp[1234][1234];
int fa[1234567],df[1234567];
inline int pw (int base , int p){
    if (p==0) return 1;
    ll now = pw(base,p/2);
    return (p%2==1) ? (((now*now)%mod)*(ll)base)%mod : (now*now)%mod;
}
inline void init (){
    int maxi = max(max(n,m),k);
    fa[0]=1;
    for (int i=1; i<=maxi; i++)
        fa[i] = ((ll)fa[i-1]*i)%mod;
    for (int i=0; i<=maxi; i++)
        df[i] = pw(fa[i],mod-2);
}
inline int calcC (int x , int y){
    return ((((ll)fa[x] * df[y])%mod) * (ll)df[x-y])%mod;
}
int main(){
    cin >> n >> m >> k; swap(n,m);
    init ();
    dp[0][0] = 1;
    for (int i=1; i<=m; i++)
        for (int j=1; j<=m; j++)
            dp[i][j] = ((ll)j * (dp[i-1][j] + dp[i-1][j-1]))%mod;
    if (n==1){
        cout << pw(k,m) << endl;
        return 0;
    }
    ll res = 0;
    for (int i=0; i<=m; i++)
        for (int j=0; j<=m; j++) if (i+2*j<=k && i+j<=m){
            if (i==0 && n!=2 && j==0)
                continue;
            ll cont = (ll)calcC(k,i) * ((calcC(k-i,j) * (ll)calcC(k-i-j,j))%mod); cont%=mod;
            cont*= pw(i,m*(n-2)); cont%=mod;
            cont*= (((ll)dp[m][i+j] * dp[m][i+j])%mod); cont%=mod;
            res+= cont; res%=mod;
        }
    cout << res << endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e9+7;
const int maxn=1e6;
const int maxm=1e4;
ll p[maxn+10];
ll inv[maxn+10];
ll dp[maxm+10];
int n,m,k;
ll mul(ll a,ll b)
{
    ll ans=1;
    while(b)
    {
        if(b&1)
            ans=ans*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ans;
}
ll c(int nn,int mm)
{
    if(mm>nn)
        return 0ll;
    if(mm==nn)
        return 1ll;
    return (p[nn]*inv[mm]%mod)*inv[nn-mm]%mod;
}
void init()
{
    p[0]=1;
    for(int i=1; i<=maxn; i++)
        p[i]=p[i-1]*i%mod;
    for(int i=0; i<=maxn; i++)
        inv[i]=mul(p[i],mod-2);
}
int main()
{
    init();
    while(~scanf("%d%d%d",&n,&m,&k))
    {
        ll ans=0;
        if(m==1)
        {
            ans=mul(k,n);
        }
        else
        {
            for(int i=1; i<=k&&i<=n; i++)
            {
                dp[i]=mul(i,n);
                for(int j=1; j<i; j++)
                {
                    dp[i]=(dp[i]-c(i,j)*dp[j]%mod+mod)%mod;
                }
            }

            if(m==2)
            {
                ll tmp;
                for(int i=1; i<=k&&i<=n; i++)
                {
                    tmp=dp[i]*dp[i]%mod;
                    ll zh=c(k,i);
                    tmp=tmp*(zh*zh%mod)%mod;
                    ans=(ans+tmp)%mod;
                }
            }
            else
            {
                for(int i=1; i<=n&&i<=k; i++)
                {
                    for(int j=0; j<=n&&j<=k; j++)
                    {
                        if(k<2*j+i||i+j>n)
                            break;
                        ll tmp=dp[i+j]*dp[i+j]%mod;
                        tmp=((tmp*c(k,i)%mod)*c(k-i,j)%mod)*c(k-i-j,j)%mod;
                        tmp=(tmp*mul(i,n*(m-2)))%mod;
                        ans=(ans+tmp)%mod;
                    }
                }
            }
        }
        printf("%lld\n",ans);
    }
    return 0;
}

#include<cstdio>
const long long M=1000000007LL;
long long to[1010];
long long jie[1000010],ny[1000010];
long long mod(long long a,long long b)
{
    long long ans=1;
    while(b)
    {
        if(b&1)
        ans=ans*a%M;
        a=a*a%M;
        b>>=1;
    }
    return ans;
}
long long c(int a,int b)
{
    if(b>a/2)
    b=a-b;
    if(b==0)
    return 1;
    return jie[a]*ny[b]%M*ny[a-b]%M;
}
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if(m==1)
    {
        printf("%I64d",mod(k,n));
        return 0;
    }
    int max,chao;
    if(n>k)
    max=k,chao=n;
    else
    max=n,chao=k;
    jie[0]=ny[0]=1;
    for(int i=1;i<=chao+5;i++)
    {
        jie[i]=jie[i-1]*i%M;
        ny[i]=mod(jie[i],M-2);
    }
    long long ans=0;
    for(int i=1;i<=max;i++)
    {
        long long temp=mod(i,n);
        for(int j=i-1;j;j--)
        temp=(temp-c(i,j)*to[j])%M;
        to[i]=temp;
        for(int j=(m==2?0:1);j<=i;j++)
        {
            temp=to[i]*to[i]%M;
            temp=temp*mod(j,n*(m-2))%M;
            temp=temp*jie[k]%M*ny[k-2*i+j]%M*ny[j]%M*ny[i-j]%M*ny[i-j]%M;
            ans=(ans+temp)%M;
        }
    }
    printf("%I64d",ans);
}

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cassert>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)      REP(i,0,n)
#define pb push_back
#define mp make_pair
#define ALL(C)   (C).begin(),(C).end()
template<class T> void vp(T &a,int p){rep(i,p)cout << a[i]<<" ";cout << endl;}
typedef complex<double>P;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const ll mod = 1000000007;
const int N = 1010;

ll comb[N][N];
void precalc(){
  comb[0][0]=1;
  REP(i,1,N){
    comb[i][i]=comb[i][0]=1;
    REP(j,1,i)comb[i][j]=(comb[i-1][j-1]+comb[i-1][j])%mod;
  }
}

const int M = 10000001;
ll fact[M];
void precalcFact(){
  fact[0]=1;
  REP(i,1,M)fact[i]=(fact[i-1]*i)%mod;
}

ll mypow(ll n,ll p){
  if (p == 0)return 1;
  if (p == 1)return n;
  ll ret=mypow(n,p/2);
  ret=ret*ret%mod;
  if (p&1)ret=ret*n%mod;
  return ret;
}

ll getinv(ll a){
  return mypow(a,mod-2);
}

//n! = a * p^e を計算する。
//a とe　それぞれがもとまる。
//log_p(n):テーブル有
//min(n,p)*log_p(n):テーブル有
ll modFact(ll n,ll p,ll &e){
  e=0;
  if (n == 0)return 1;
  ll res = modFact(n/p,p,e);
  e+=n/p;
  ll f = 1;
  //REP(i,2,n+1)f=f*i%p;//pがテーブルを作れるサイズならテーブルを作るべき。
  f = fact[n];
  if ((n/p) % 2 != 0)return res*(p-f)%p;
  return res*f%p;
}

//p=mod
//min(n,p)log_p
ll modComb(ll n,ll k,ll p){
  if (n < 0 || k < 0 || n < k)return 0;
  ll e1,e2,e3;
  ll a1=modFact(n,p,e1),a2=modFact(k,p,e2),a3=modFact(n-k,p,e3);
  if (e1 > e2+e3)return 0;
  return a1 * getinv(a2*a3%p)%p;
}

ll dp[N][N];//1*i番のグリッドをj色で塗る場合の数。
void precalc2(){
  rep(i,N)rep(j,N)dp[i][j]=0;
  dp[0][0]=1;
  REP(i,1,N){
    REP(j,1,i+1){
      dp[i][j]=(dp[i-1][j-1]+(dp[i-1][j]*j)%mod)%mod;
    }
  }
}

ll solve(int r,int c,int k){
  if (c == 1){
    ll ret=0;
    /*
    REP(i,1,min(k,r)+1){
      ll tmp = dp[r][i]*modComb2(k,i,mod)%mod;
      ret+=tmp;
      ret%=mod;
    }
    */
    return mypow(k,r);
  }
  if (c == 2){
    ll ret= 0;
    REP(i,1,min(k,r)+1){
      ll  a = modComb(k,i,mod)*dp[r][i]%mod;
      a=a*fact[i]%mod;
      ret=ret+(a*a)%mod;
      ret%=mod;
    }
    return ret;
  }
  ll ret=0;
  REP(i,1,min(k,r)+1){
    rep(common,i+1){
      ll cmb1 = modComb(k,common,mod);
      ll cmb2 = modComb(k-common,i-common,mod);
      ll cmb3 = modComb(k-common-(i-common),i-common,mod);

      ll tmp = ((cmb1*cmb2%mod)*cmb3)%mod;
      ll tmp2 =mypow(common,r*(c-2));
      ll tmp3=dp[r][i]*fact[i]%mod;
      ll tmp4=(tmp*tmp2)%mod;
      tmp3=tmp3*tmp3%mod;
      tmp4=tmp4*tmp3%mod;
      ret+=tmp4;
      ret%=mod;
    }
  }
  return ret;
}
/*
1 3
2 864
3 1188

*/

main(){
  precalc();
  precalc2();
  precalcFact();
  int r,c,k;
  while(cin>>r>>c>>k){
#ifdef DEBUG
    time_t et_0 = clock();
#endif
    cout << solve(r,c,k) << endl;
#ifdef DEBUG
    time_t et_1 = clock();
    fprintf(stderr, "Execution time = %0.0lf ms\n", (et_1 - et_0) * 1000.0 / CLOCKS_PER_SEC);
#endif

#ifdef DEBUG
    cout <<"end " <<  endl;
#endif
  }
  return false;
}

#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define upperlimit 1000100
#define INF 1000000100
#define INFL 1000000000000000100
#define eps 1e-8
#define endl '\n'
#define sd(n) scanf("%d",&n)
#define slld(n) scanf("%lld",&n)
#define pd(n) printf("%d",n)
#define plld(n) printf("%lld",n)
#define pds(n) printf("%d ",n)
#define pllds(n) printf("%lld ",n)
#define pdn(n) printf("%d\n",n)
#define plldn(n) printf("%lld\n",n)
#define REP(i,a,b) for(i=a;i<=b;i++)
#define mp make_pair
#define pb push_back
#define pcc pair<char,char>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++)
#define F first
#define S second

using namespace std;

ll gcd(ll n1,ll n2){
	if(!n1)return n2;
	if(!n2)return n1;
	if(n1%n2==0)return n2;
	return gcd(n2,n1%n2);
}
ll powmod(ll base,ll exponent)
{
	ll ans=1;
	while(exponent){
		if(exponent&1)ans=(ans*base)%mod;
		base=(base*base)%mod;
		exponent/=2;
	}
	return ans;
}
ll fact[upperlimit+1];
ll dp[1010][1010];
ll C(int n,int r){
	if(r<0 || r>n)return 0;
	ll ret=fact[n];
	ret*=powmod((fact[r]*fact[n-r])%mod,mod-2);
	return (ret%mod);
}
ll f(int n,int x){
	if(x>n || x<=0)return 0;
	if(x==1)return 1;
	if(dp[n][x]!=-1)return dp[n][x];
	ll ret=0;
	int i,j;
	for(i=1;i<x;i++){
		ret+=(C(x,i)*f(n,i))%mod;
		ret%=mod;
	}
	ret=(mod+powmod(x,n)-ret)%mod;
	dp[n][x]=ret;
	return ret;
}
int main()
{
	int i,j,k,n,m;
	int x,z;
	sd(n);sd(m);
	sd(k);
	ll answer=0;
	for(i=0;i<1010;i++)for(j=0;j<1010;j++)dp[i][j]=-1;
	fact[0]=1;
	for(i=1;i<=upperlimit;i++)fact[i]=(i*fact[i-1])%mod;
	for(x=0;x<=n;x++)for(z=0;x+z<=n;z++){
		ll temp=(C(k,x)*C(k-x,x))%mod;
		ll temp1=f(n,x+z);
		temp=(temp*C(k-x-x,z))%mod;
		temp=(temp*powmod(z,n*(m-2)))%mod;
		temp=(temp*temp1)%mod;
		temp=(temp*temp1)%mod;
		answer=(answer+temp)%mod;
	}
	if(m==1)answer=powmod(k,n);
	plld(answer);
	return 0;
}

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <algorithm>
#include <sstream>
#include <stack>
#include <cstring>
#include <iomanip>
using namespace std;
#define pb push_back
#define INF 1000000000
#define FOR(i,n) for(int (i)=0;(i)<(n);++(i))
#define FORI(i,n) for(int (i)=1;(i)<=(n);++(i))
#define mp make_pair
#define pii pair<int,int>
#define ll long long
#define vi vector<int>
#define SZ(x) ((int)(x.size()))
#define fi first
#define se second
#define wez(n) int (n); scanf("%d",&(n));
#define wez2(n,m) int (n),(m); scanf("%d %d",&(n),&(m));
#define wez3(n,m,k) int (n),(m),(k); scanf("%d %d %d",&(n),&(m),&(k));
inline void pisz(int n) { printf("%d\n",n); }
template<typename T,typename TT> ostream& operator<<(ostream &s,pair<T,TT> t) {return s<<"("<<t.first<<","<<t.second<<")";}
template<typename T> ostream& operator<<(ostream &s,vector<T> t){FOR(i,SZ(t))s<<t[i]<<" ";return s; }
#define IN(x,y) ((y).find((x))!=(y).end())
#define DBG(vari) cerr<<#vari<<" = "<<(vari)<<endl;
#define ALL(t) t.begin(),t.end()
#define FOREACH(i,t) for (typeof(t.begin()) i=t.begin(); i!=t.end(); i++)
#define TESTS wez(testow)while(testow--)
#define REP(i,a,b) for(int (i)=(a);(i)<=(b);++i)
#define REPD(i,a,b) for(int (i)=(a); (i)>=(b);--i)
#define REMAX(a,b) (a)=max((a),(b));
#define REMIN(a,b) (a)=min((a),(b));

const ll MOD = 1000000007;
ll powe (ll x, ll pwr) {
    if (pwr==0) return 1;
    ll w = powe((x*x)%MOD,pwr/2);
    if (pwr&1) w = (w*x)%MOD;
    return w;
}
ll modinvv (ll i) {
   return powe(i,MOD-2);
}

#define NEED 1000
ll nt[NEED+1][NEED+1];
void initnewton () {
    FOR(n,NEED+1) nt[n][0] = 1;
    FORI(k,NEED) nt[0][k] = 0;
    FORI(n,NEED) FORI(k,NEED) nt[n][k] = (nt[n-1][k-1] + nt[n-1][k]) % MOD;
}

ll modinv[1005], kol[1005], d[1005][1005];
// kol[i] - liczba kolorowan n obiektow za pomoca dokladnie i kolorow
// d[a][b] = uogolniony newton: (k nad a,b,b)

/*ll newton (ll a, ll b) { // dla a > 1000, niewielkich b
   ll w = 1;
   FORI(i,b) {
      w *= a-i+1;
      w %= MOD;
      w *= modinv[i];
      w %= MOD;
   }
   return w;
}*/

int main () {
   FORI(i,1001) modinv[i] = modinvv(i);
   wez3(n,m,k)
   initnewton();

   kol[0] = 0;
   FORI(i,1000) {
      kol[i] = powe(i,n);
      REP(j,1,i-1) {
         kol[i] -= nt[i][j] * kol[j];
         kol[i] %= MOD;
      }
   }

   if (m == 1) {
      ll w = powe(k,n);
      if (w < 0) w += MOD;
      pisz(w);
      return 0;
   }

   /*if (m == 2) {
      ll w = 0;
      for (int c = 1; c <= n; ++c) {
         ll g = newton(k,c) * kol[c];
         g %= MOD;
         w += g*g;
         w %= MOD;
      }
      if (w < 0) w += MOD;
      pisz(w);
      return 0;
   }*/

   d[0][0] = 1;
   FOR(a,1000) d[a+1][0] = (((d[a][0] * (k-a)) % MOD) * modinv[a+1]) % MOD;
   FOR(b,1000) {
      FOR(a,1001) {
         ll u = d[a][b];
         u *= ((ll)(k-2*b-a) * (k-2*b-a-1)) % MOD;
         u %= MOD;
         FOR(f,2) {
            u *= modinv[b+1];
            u %= MOD;
         }
         d[a][b+1] = u;
      }
   }

   ll suma = 0;
   for (ll a = 0; a <= n && a <= k; ++a) {
      for (ll b = 0; a+b <= n && a+2*b <= k; ++b) {
         ll wyr = d[a][b];
         wyr *= powe(a,(m-2)*n);
         wyr %= MOD;
         FOR(f,2) {
            wyr *= kol[a+b];
            wyr %= MOD;
         }
         suma = (suma+wyr)%MOD;
      }
   }
   if (suma < 0) suma += MOD;
   pisz(suma);
}

#include <iomanip>
#include <algorithm>
#include <numeric>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <complex>
#include <cassert>
#include <bitset>
using namespace std;

#define forn(i,n) for(int i=0;i<(int)(n);i++)
#define si(c) ((int)(c).size())
#define forsn(i,s,n) for(int i = (int)(s); i<((int)n); i++)
#define dforsn(i,s,n) for(int i = (int)(n)-1; i>=((int)s); i--)
#define decl(v, c) typeof(c) v = c
#define forall(i, c) for(decl(i, c.begin()); i!=c.end(); ++i)
#define dforall(i, c) for(decl(i, c.rbegin()); i!=c.rend(); ++i)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define D(a) cerr << #a << "=" << a << endl;
#define pb push_back
#define eb emplace_back
#define mp make_pair

#ifdef LOCAL
#define printLong(x) cout << x << endl
#define readLong(x) cin >> x
#else
#define printLong(x) printf("%I64d\n",x)
#define readLong(x) scanf("%I64d", &x)
#endif

typedef long long int tint;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<tint> vt;
typedef vector<vt> vvt;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

const int MAXN = 1010;
const int MAXK = 1e6 + 10;
const int MOD = 1e9 + 7;

int stirling[MAXN][MAXN];
tint fact[MAXK];

int expomod(tint a, int e) {
    tint res = 1;
    while (e) {
        if (e&1) res = res*a%MOD;
        e /= 2;
        a = a*a%MOD;
    }
    return res;
}

int inv(int x) { return expomod(x,MOD-2); }

int comb(int m, int n) {
    if (m < 0 || n < 0 || n > m) return 0;
    return fact[m] * inv(fact[n]) % MOD * inv(fact[m-n]) % MOD;
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);

    fact[0] = 1;
    forsn(n,1,MAXK) fact[n] = n*fact[n-1]%MOD;

    stirling[0][0] = 1;
    forsn(n,1,MAXN) forsn(k,1,n+1) {
        stirling[n][k] = (tint(k)*stirling[n-1][k] + tint(k)*stirling[n-1][k-1]) % MOD;
    }
    //forn(n,MAXN) forn(k,MAXN) stirling[n][k] = fact[k]*stirling[n][k] % MOD;

    int n,m,k; cin >> n >> m >> k;
    if (m == 1) {
        cout << expomod(k,n) << endl;
        return 0;
    }
    tint res = 0;
    forn(inter,min(n,k)+1) forn(extra,min(n,k)+1-inter) {
        int a = inter+extra, b = inter;
        tint pos = stirling[n][a] * 1LL * comb(k,inter) % MOD * comb(k-inter,extra) % MOD;
        pos = pos*stirling[n][a] % MOD * comb(k-a, extra) % MOD;
        pos = pos*expomod(b,n*(m-2))%MOD;
        res += pos;
    }
    res %= MOD; if (res < 0) res += MOD;
    cout << res << endl;

    return 0;
}

#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <complex>
#include <vector>
#include <string>
#include <queue>
#include <map>
#include <set>

using namespace std;

#define all(a) (a).begin(), (a).end()
#define sz(a) int((a).size())
#define FOR(i, a, b) for(int i(a), _b(b); i < _b; ++i)
#define REP(i, n) FOR(i, 0, n)
#define FORD(i, a, b) for(int i(a), _b(b); i >= _b; --i)
#define CL(a, v) memset(a, v, sizeof a)
#define UNIQUE(a) sort(all(a)), (a).erase(unique(all(a)), (a).end())
#define pb push_back
#define X first
#define Y second

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;

const int INF = 1000000000;
const ll INFLL = 1000000000000000000LL;

const int mod = 1000000007;

int mul(int a, int b) { return ll(a)*b % mod; }
int add(int a, int b) { a+=b; if(a>=mod) a-=mod; return a; }

int qpow(int a, int p) {
  int res = 1;
  while(p) {
    if(p&1) res = mul(res, a);
    a = mul(a, a);
    p>>=1;
  }
  return res;
}

int inv(int a) { return qpow(a, mod-2); }

const int h = 1000011, N=1011;
int f[h], invf[h], dp[N][N], p[N];

int C(int n, int k) {
  if(k>n || k<0) return 0;
  return mul(f[n], inv(mul(f[k], f[n-k])));
}

int C(int n, int k1, int k2, int k3) {
  if(k1+k2+k3>n) return 0;
  return mul(f[n], mul(mul(invf[k1], invf[k2]), mul(invf[k3], invf[n-k1-k2-k3])));
}

int A(int n, int k) {
  if(k>n || k<0) return 0;
  return mul(f[n], inv(f[n-k]));
}

int n,m, k, res=0;

int main () {
#ifdef LocalHost
//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);
#endif
  //REP(i, 10) { REP(j, 10) printf("%d ", dp[i][j]); printf("\n"); }
  scanf("%d%d%d", &n, &m, &k);
  f[0] = 1;
  REP(i, k) f[i+1] = mul(f[i], i+1);
  REP(i, k+1) if(i<=2*N || i+3*N>=k) invf[i] = inv(f[i]);

  dp[0][0] = 1;
  FOR(i, 1, n+1) FOR(j, 1, i+1)
    dp[i][j] = add(dp[i-1][j-1], mul(j, dp[i-1][j]));
//  REP(i, n+1) REP(j, i+1) dp[n][i] = mul(dp[n][i], f[i]);

  if(m==1) {
    printf("%d\n", qpow(k, n));
    return 0;
  }

  REP(j, N) p[j] = qpow(j, n*(m-2));

  FOR(i, 1, min(n, k)+1) REP(j, i+1) if(2*i-j<=k) {
    //printf("%d, %d: %d %d\n", i, j, A(k, 2*i-j), dp[n][i]);
    res = add(res, mul(mul(C(k, j, i-j, i-j), p[j]), qpow(mul(f[i], dp[n][i]), 2)));
  }
  printf("%d\n", res);
#ifdef LocalHost
  cout << endl << "Time: " << clock() << endl;
#endif
  return 0;
}

#include<iostream>
#include<math.h>
#include<algorithm>
#include<stdio.h>
#include<map>
#include<vector>
#include<set>
#include<iomanip>
#define F first
#define S second
#define P system("PAUSE");
#define H return 0;
#define pb push_back
using namespace std;
const long long MOD=1000000007,N=1228,M=1000228;

long long ans,l,r,t,i,j,n,m,k,fac[M],inv[M],dp[N][N];

long long Pow(long long a,long long b){
	if(!b)return 1;
	if(b%2==0){long long d=Pow(a,b/2);return d*d%MOD;}else return Pow(a,b-1)*a%MOD;
}

long long C(long long n, long long m){
	return ((fac[n]*inv[n-m])%MOD)*inv[m]%MOD;
}

int main() {
	fac[0]=1,dp[0][0]=1;
	for(i=1;i<=M-1;i++)fac[i]=fac[i-1]*i%MOD;
	inv[M-1]=Pow(fac[M-1],MOD-2);
	for(i=M-1;i>0;i--)inv[i-1]=inv[i]*i%MOD;
	for(i=1;i<N;i++)for(j=1;j<=i;j++)dp[i][j]=(((dp[i-1][j]+dp[i-1][j-1])%MOD)*j)%MOD;
	cin>>n>>m>>k;
	l=1,r=min(n,k);
	if(m==1)for(i=l;i<=r;i++)ans=(ans+(dp[n][i]*C(k,i))%MOD)%MOD;else{
		if(m==2)l=0;
		for(i=l;i<=r;i++)for(j=0;j*2+i<=k && j+i<=n;j++){
			t=dp[n][i+j]*dp[n][i+j]%MOD;
			t*=C(k,i),t%=MOD;
			t*=C(k-i,j),t%=MOD;
			t*=C(k-i-j,j),t%=MOD;
			t=t*Pow(i,n*(m-2))%MOD;
			ans=(ans+t)%MOD;
		}
	}
	cout<<ans;
}

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>

#define rep(i, n) repb(i, 0, n)
#define repb(i, b, n) repbc(i, b, n, <)
#define repe(i, n) repbe(i, 0, n)
#define repbe(i, b, n) repbc(i, b, n, <=)
#define repbc(i, b, n, c) for(int i = b; i c n; i++)

using namespace std;

typedef long long ll;

#define MOD 1000000007

ll powmod(ll x, ll n) {
  ll res = 1, exp = x;
  while (n > 0LL) {
    if (n & 1) {
      res = (res * exp) % MOD;
    }
    exp = (exp * exp) % MOD;
    n >>= 1;
  }
  return res % MOD;
}

ll inverse(ll i) {
  return powmod(i, MOD - 2) % MOD;
}

vector<ll> fact, rfact;

ll comb(ll n, ll k) {
  if (k > n) return 0;
  return (((fact[n] * rfact[k]) % MOD) * rfact[n - k]) % MOD;
}

int main() {
  fact.push_back(1);
  rfact.push_back(1);
  for (int i = 1; i < 1000001; i++) {
    fact.push_back((fact.back() * (ll) i) % MOD);
    rfact.push_back((rfact.back() * inverse(i)) % MOD);
  }
  ll dp[1010][1010] = {{0}};
  dp[0][0] = 1;
  for (int i = 1; i < 1010; i++) {
    for (int j = 1; j < 1010; j++) {
      dp[i][j] = (((dp[i - 1][j] * (ll)j) % MOD) + dp[i - 1][j - 1]) % MOD;
    }
  }
  /*
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
      // cout << comb(i, j) << " ";
      cout << dp[i][j] << " ";
    }
    cout << endl;
  }
  cout << endl;//*/
  ll n, m, k;
  cin >> n >> m >> k;

  if (m == 1) {
    cout << powmod(k, n);
    return 0;
  }

  ll res = 0;
  for (ll y = 0; y <= n; y++) {
    ll p = powmod(y, n * (m - 2));
    for (ll x = y; x <= n; x++) {
      if (2 * x - y > k) continue;
      ll cur = comb(k, 2 * x - y) % MOD;
      cur *= comb(2 * x - y, x - y);
      cur %= MOD;
      cur *= comb(x, x - y);
      cur %= MOD;
      cur *= dp[n][x];
      cur %= MOD;
      cur *= dp[n][x];
      cur %= MOD;
      cur *= fact[x];
      cur %= MOD;
      cur *= fact[x];
      cur %= MOD;
      cur *= p;
      cur %= MOD;
      res += cur;
      res %= MOD;
    }
  }

  cout << res << endl;
}

#pragma comment (linker, "/STACK:16777216")
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <numeric>
#include <complex>
#include <string>
#ifdef IGEL_ACM
#include <ctime>
#endif

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef pair <int, int> pnt;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector <vector < pair <int, int> > > VVP;

#define FI(i,a) for (int i=0; i<(a); ++i)
#define RFI(i,a) for (int i=(a); i>=0; --i)
#define FOR(i,s,e) for (int i=(s); i<(e); ++i)
#define RFOR(i,e,s) for (int i=(e); i>=s; --i)
#define MEMS(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define mp make_pair
#define ALL(a) a.begin(),a.end()
#define ISIN(s,a) (s.find(a)!=s.end())
#define sqr(a) ((a)*(a))
#define CPY(a, b) memcpy(a, b, sizeof(a))

#define dout(a) cerr << a << endl
#define sout(a) cerr << a << "  "

const double pi = 3.14159265358979323846264338327950288419716939937511;
const double eps = 1e-11;
//*
char ch_ch_ch[1<<20];
string gs() {scanf("%s",ch_ch_ch); return string(ch_ch_ch);}
string gl() {gets(ch_ch_ch); return string(ch_ch_ch);}
//*/

const int mod=1000000007;

int n,m,k;

inline void mulmod(int &a, int b)
{
    a=(a*1ll*b)%mod;
}

int pw(int x, int a)
{
    int res=1;
    while (a)
    {
        if (a&1) mulmod(res,x);
        mulmod(x,x);
        a>>=1;
    }
    return res;
}

int fact[1000100], revf[1000100];

inline int modadd(int a, int b)
{
    a+=b;
    return (a>=mod)?(a-mod):a;
}

int c[1010][1010];
int dp[1010][1010];

int C(int a, int b)
{
    if (a<b) return 0;
    if (a==b || b==0) return 1;
    if (c[a][b]!=-1) return c[a][b];
    return c[a][b]=modadd(C(a-1,b-1),C(a-1,b));
}

int Paint(int k, int n)
{
    if (k>n) return 0;
    if (dp[k][n]!=-1) return dp[k][n];
    int res=0;
    for (int j=k; j>=1; --j)
    {
        int cur=pw(j,n);
        mulmod(cur,C(k,j));
        if ((k-j)&1) res=modadd(res+mod,-cur);
        else res=modadd(res,cur);
    }
    return dp[k][n]=res;
}

void solution()
{

    cin >> n >> m >> k;
    MEMS(dp,-1);
    MEMS(c,-1);

    if (m==1) { cout << pw(k,n) << endl; return;}
    fact[0]=revf[0]=1;
    FOR(i,1,1000001)
    {
        fact[i]=fact[i-1];
        mulmod(fact[i],i);
        revf[i]=pw(fact[i],mod-2);
    }
    int r=0;
    FOR(x,0,n+1) FOR(y,0,n-x+1) if (x!=0 || y!=0)
    if (2*x+y>k) break; else
    {
       // dout(x << ' ' << y);
        int res=1;
        mulmod(res,fact[k]);
        mulmod(res,revf[y]);
        mulmod(res,revf[x]);
        mulmod(res,revf[x]);
        mulmod(res,revf[k-2*x-y]);

      //  dout(res);
        mulmod(res,pw(y,n*(m-2)));
       // dout(res);

        mulmod(res,Paint(x+y,n));
        mulmod(res,Paint(x+y,n));

       // dout(res);
        r=modadd(r,res);
      }

    cout << r << endl;

}

int main(int argc, char** argv)
{

#ifdef IGEL_ACM
        freopen("sample.in","r",stdin);
	//freopen("sample.in", "w", stdout);
	clock_t beg_time = clock();
#else
        //freopen(argv[1],"r",stdin);
	//freopen("drawing.dat", "r", stdin);
	//freopen("drawing.sol", "w", stdout);
#endif

        solution();

#ifdef IGEL_ACM
	fprintf(stderr,"Time: %.3lf\n",1.0*(clock()-beg_time)/CLOCKS_PER_SEC);
#endif

    return 0;
}

#pragma comment (linker, "/STACK:16777216")
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <numeric>
#include <complex>
#include <string>
#ifdef IGEL_ACM
#include <ctime>
#endif

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef pair <int, int> pnt;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector <vector < pair <int, int> > > VVP;

#define FI(i,a) for (int i=0; i<(a); ++i)
#define RFI(i,a) for (int i=(a); i>=0; --i)
#define FOR(i,s,e) for (int i=(s); i<(e); ++i)
#define RFOR(i,e,s) for (int i=(e); i>=s; --i)
#define MEMS(a,b) memset(a,b,sizeof(a))
#define pb push_back
#define mp make_pair
#define ALL(a) a.begin(),a.end()
#define ISIN(s,a) (s.find(a)!=s.end())
#define sqr(a) ((a)*(a))
#define CPY(a, b) memcpy(a, b, sizeof(a))

#define dout(a) cerr << a << endl
#define sout(a) cerr << a << "  "

const double pi = 3.14159265358979323846264338327950288419716939937511;
const double eps = 1e-11;
//*
char ch_ch_ch[1<<20];
string gs() {scanf("%s",ch_ch_ch); return string(ch_ch_ch);}
string gl() {gets(ch_ch_ch); return string(ch_ch_ch);}
//*/

const int mod=1000000007;

int n,m,k;

inline void mulmod(int &a, int b)
{
    a=(a*1ll*b)%mod;
}

int pw(int x, int a)
{
    int res=1;
    while (a)
    {
        if (a&1) mulmod(res,x);
        mulmod(x,x);
        a>>=1;
    }
    return res;
}

int fact[1000100], revf[1000100];

inline int modadd(int a, int b)
{
    a+=b;
    return (a>=mod)?(a-mod):a;
}

int dp[1010];

int Paint(int k)
{
    if (k>n) return 0;
    if (dp[k]!=-1) return dp[k];
    int res=0;
    for (int j=k; j>=1; --j)
    {
        int cur=pw(j,n);
        mulmod(cur,fact[k]);
        mulmod(cur,revf[k-j]);
        mulmod(cur,revf[j]);
        if ((k-j)&1) res=modadd(res+mod,-cur);
        else res=modadd(res,cur);
    }
    return dp[k]=res;
}

void solution()
{

    cin >> n >> m >> k;
    MEMS(dp,-1);

    if (m==1) { cout << pw(k,n) << endl; return;}
    fact[0]=revf[0]=1;
    FOR(i,1,1000001)
    {
        fact[i]=fact[i-1];
        mulmod(fact[i],i);
        revf[i]=pw(fact[i],mod-2);
    }
    int r=0;
    FOR(x,0,n+1) FOR(y,0,n-x+1) if (x!=0 || y!=0)
    if (2*x+y>k) break; else
    {
       // dout(x << ' ' << y);
        int res=1;
        mulmod(res,fact[k]);
        mulmod(res,revf[y]);
        mulmod(res,revf[x]);
        mulmod(res,revf[x]);
        mulmod(res,revf[k-2*x-y]);

      //  dout(res);
        mulmod(res,pw(y,n*(m-2)));
       // dout(res);

        mulmod(res,Paint(x+y));
        mulmod(res,Paint(x+y));

       // dout(res);
        r=modadd(r,res);
      }

    cout << r << endl;

}

int main(int argc, char** argv)
{

#ifdef IGEL_ACM
        freopen("sample.in","r",stdin);
	//freopen("sample.in", "w", stdout);
	clock_t beg_time = clock();
#else
        //freopen(argv[1],"r",stdin);
	//freopen("drawing.dat", "r", stdin);
	//freopen("drawing.sol", "w", stdout);
#endif

        solution();

#ifdef IGEL_ACM
	fprintf(stderr,"Time: %.3lf\n",1.0*(clock()-beg_time)/CLOCKS_PER_SEC);
#endif

    return 0;
}

/*Studied from ZhouYuChen*/
#include<iostream>
#include<algorithm>
#include<cstring>
#include<numeric>
using namespace std;
const unsigned long long mod=1e9+7;
unsigned long long n,m,k,p[1000001],ans[1001],Ans;

unsigned long long pow(unsigned long long a,unsigned long long b)
{
	unsigned long long tmp=a,ret=1;
	for(;b;tmp*=tmp,tmp%=mod,b>>=1)
		if(b&1)ret*=tmp,ret%=mod;
	return ret;
}

unsigned long long C(int a,int b)
{
	return p[a]*pow(p[a-b],mod-2)%mod*pow(p[b],mod-2)%mod;
}

int main()
{
	#ifndef ONLINE_JUDGE
		freopen("yoshi.in","rb",stdin);
		freopen("yoshi.out","wb",stdout);
	#endif
	cin>>n>>m>>k;
	if(m==1)
	{
		cout<<pow(k,n)<<endl;
		return 0;
	}
	p[0]=1;
	for(int i=1;i<=k;++i)p[i]=p[i-1]*i%mod;
	for(int i=1;i<=n;++i)
	{
		ans[i]=pow(i,n);
		for(int j=1;j<i;++j)
			ans[i]=(ans[i]+mod-C(i,j)*ans[j]%mod)%mod;
	}
	for(int i=0;i<=n&&i<=k;++i)
	{
		unsigned long long tmp=0;
		for(int j=0;j<=n-i;++j)if(i+2*j<=k)
		tmp=(tmp+ans[i+j]*ans[i+j]%mod*C(k,i)%mod*C(k-i,j)%mod*C(k-i-j,j)%mod)%mod;
		Ans=(Ans+tmp*pow(i,n*(m-2))%mod)%mod;
	}
	cout<<Ans<<endl;
	return 0;
}

#include <cstdio>

const int p=1000000007;
int fac[1200000],inv[1200000];
int f[1200];
int i,j,k,m,n,s;

inline int power(int x,int y)
{
	if (y==0)
		return 1;
	int t=power(x,y/2);
	t=1LL*t*t%p;
	if (y&1)
		t=1LL*t*x%p;
	return t;
}

inline void pre_C()
{
	fac[0]=1;
	for (int i=1;i<=k;i++)
		fac[i]=1LL*fac[i-1]*i%p;
	inv[k]=power(fac[k],p-2);
	for (int i=k-1;i>=0;i--)
		inv[i]=1LL*inv[i+1]*(i+1)%p;
	return;
}

inline int C(int x,int y)
{
	return 1LL*fac[x]*inv[y]%p*inv[x-y]%p;
}

int main()
{
	scanf("%d%d%d",&n,&m,&k);
	pre_C();
	for (i=1;i<=n;i++)
	{
		f[i]=power(i,n);
		for (j=1;j<i;j++)
			f[i]=(f[i]+p-1LL*C(i,j)*f[j]%p)%p;
	}
	if (m==1)
		printf("%d",power(k,n));
	if (m==2)
	{
		for (i=1;i<=n;i++)
			s=(s+1LL*C(k,i)*C(k,i)%p*f[i]%p*f[i]%p)%p;
		printf("%d",s);
	}
	if (m>2)
	{
		for (i=1;i<=n;i++)
			for (j=0;(i+j<=n) && (i+2*j<=k);j++)
				s=(s+1LL*C(k,i)*C(k-i,j)%p*C(k-i-j,j)%p*f[i+j]%p*f[i+j]%p*power(i,n*(m-2))%p)%p;
		printf("%d",s);
	}
	return 0;
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

#define _int64 long long
#define mo 1000000007

int d[1010][1010];

int pp(int x,int y)
{
	int a[100];
	int i,m;
	_int64 ans;
	if (y==0) return 1;
	m=0;
	while (y>0)
	{
		a[m]=y%2;
		y/=2;
		m++;
	}
	ans=1;
	for (i=m-1;i>=0;i--)
	{
		ans=ans*ans;
		ans%=mo;
		if (a[i]==1)
		{
			ans*=x;
			ans%=mo;
		}
	}
	return ans;
}

pair<_int64,_int64> solve(int x,int y)
{
	if (x==0) return make_pair(0,1);
	pair<_int64,_int64> p=solve(y%x,x);
	return make_pair(p.second-p.first*(y/x),p.first);
}

int inv(int x)
{
	pair<_int64,_int64> p=solve(x,mo);
	p.first%=mo;
	while (p.first<0) p.first+=mo;
	return p.first;
}

_int64 cc[2010];
int c1[2010][2010];
int jie[1010];

int main()
{
	int i,j,m,n,k;
	_int64 tmp,ans,x;
	/*
	for (i=1;i<=1000000;i++)
	{
		j=inv(i);
		x=i;
		x*=j;
		x%=mo;
		if (x!=1)
		{
			x=x;
		}
	}*/
	scanf("%d%d%d",&m,&n,&k);
	if (n==1)
	{
		ans=1;
		for (i=0;i<m;i++)
		{
			ans*=k;
			ans%=mo;
		}
		printf("%d\n",(int)ans);
		return 0;
	}
	memset(d,0,sizeof(d));
	d[0][0]=1;
	for (i=0;i<m;i++)
		for (j=0;j<=i;j++)
		{
			d[i+1][j]=((_int64)d[i][j]*j+d[i+1][j])%mo;
			d[i+1][j+1]+=d[i][j];
			if (d[i+1][j+1]>=mo) d[i+1][j+1]-=mo;
		}
	ans=0;
	cc[0]=1;
	for (i=1;(i<=m+m)&&(i<=k);i++)
	{
		cc[i]=cc[i-1];
		cc[i]*=(k-i+1);
		cc[i]%=mo;
		cc[i]*=inv(i);
		cc[i]%=mo;
	}
	for (i=0;i<=m+m;i++)
	{
		c1[i][0]=1;
		c1[i][i]=1;
		for (j=1;j<i;j++)
		{
			c1[i][j]=c1[i-1][j]+c1[i-1][j-1];
			if (c1[i][j]>=mo) c1[i][j]-=mo;
		}
	}
	jie[0]=1;
	for (i=1;i<=m;i++)
		jie[i]=(_int64)jie[i-1]*i%mo;

	for (i=1;(i<=m)&&(i<=k);i++)
		for (j=0;j<=i;j++)
		{
			if (i+i-j>k) continue;
			tmp=cc[i+i-j];
			tmp*=c1[i+i-j][i-j];
			tmp%=mo;
			tmp*=c1[i][i-j];
			tmp%=mo;
			tmp*=d[m][i];
			tmp%=mo;
			tmp*=jie[i];
			tmp%=mo;
			tmp*=d[m][i];
			tmp%=mo;
			tmp*=jie[i];
			tmp%=mo;
			tmp*=pp(j,(n-2)*m);
			tmp%=mo;
			ans+=tmp;
			ans%=mo;
		}
	printf("%d\n",(int)ans);
	return 0;
}

#include<vector>
#include<stack>
#include<set>
#include<map>
#include<queue>
#include<deque>
#include<bitset>
#include<complex>

#include<sstream>
#include<fstream>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cassert>
#include<cstdlib>
#include<cstdio>
#include<cmath>
#include<climits>

#define oo            (int)13e7
#define s(n)          scanf("%d",&n)
#define sl(n)         scanf("%lld",&n)
#define sf(n)         scanf("%lf",&n)
#define fill(a,v)     memset(a, v, sizeof a)
#define ull           unsigned long long
#define ll            long long
#define bitcount      __builtin_popcount
#define all(x)        x.begin(), x.end()
#define pb( z )       push_back( z )
#define gcd           __gcd
using namespace std;

const int mod = 1000000007;
int expo(int _a, int p) {
    ll r = 1, a = _a;
    while (p > 0) {
        if (p&1) {
            r = (r * a) % mod;
        }
        a = (a * a) % mod;
        p >>= 1;
    }
    return r;
}
int modInv(int a) {
    return expo(a, mod-2);
}

const int mxn = 1000007;
int f[mxn];
int finv[mxn];

int comb(int n, int k) {
    if (n < k) return 0;
    ll w = f[n];
    w = ( w * finv[k] ) % mod;
    w = ( w * finv[n-k] ) % mod;
    return w;
}
int tilings[mxn];

int main(int argc, char** argv) {
    f[0] = 1;
    for (int i=1; i < mxn; i++) {
        f[i] = ( f[i-1] * (ll) i ) % mod;
    }
    for (int i=0; i < mxn; i++) {
        finv[i] = modInv(f[i]);
    }

    int n, m, k;
    cin>>n>>m>>k;

    for (int distinct=1; distinct <= n && distinct <= k; distinct++) {
        if (distinct == 1) {
            tilings[distinct] = 1;
        } else {
            ll ans = expo(distinct, n);
            for (int j=distinct-1; j >= 1; j--) {
                ans -= comb(distinct, j)* (ll) tilings[j];
                ans %= mod;
            }
            ans = (ans + mod)%mod;
            tilings[distinct] = ans;
        }
        //cout << distinct << " colors in " << n << " tiles " << tilings[distinct] << endl;
    }

    if (m==1) {
        cout << expo(k, n) << endl;
    } else {
        ll ans = 0;
        for (int distinct=1; distinct <= n; distinct++) {
            for (int common=0; common <= distinct; common++) {
                int total = 2*distinct - common;
                if (total > k) continue;
                int side = distinct - common;
                ll waysToPick = comb(k, common); //cout << waysToPick << endl;
                waysToPick *= comb(k-common, side); waysToPick %= mod; //cout << waysToPick << endl;
                waysToPick *= comb(k-common-side, side); waysToPick %= mod;  //cout << waysToPick << endl;

                //printf("C(%d, %d) * C(%d, %d) * C(%d, %d)\n", k, common, k-common, side, k-common-side, side);

                ll waysToColor = expo( common, n*(m-2) );
                waysToColor *= tilings[distinct]; waysToColor %= mod;
                waysToColor *= tilings[distinct]; waysToColor %= mod;

                ans = (ans + waysToColor*waysToPick) % mod;
            }
        }
        cout << ans << endl;
    }

	return 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <string>
#include <map>
#include <set>
#include <vector>
#define For(i,a,n)  for(int i=(a);i<=(n);i++)
#define Forn(i,a,n) for(int i=(a);i>=(n);i--)
using namespace std;
const int mod=1e9+7;

int n,m,k;
int f[1005][1005];
int fac[1000005],inv[1000005];

void setIO(string a){
     string in=a+".in",out=a+".out";
     freopen(in.c_str(),"r",stdin);
     freopen(out.c_str(),"w",stdout);
}

int pw(int x,int y){
    int A=1;
    for(;y;y>>=1,x=1ll*x*x%mod) if(y&1) A=1ll*A*x%mod;
    return A;
}

int C(int x,int y){
    if(x<y)return 0;
    int A=fac[x];
    A=1ll*A*inv[y]%mod;
    A=1ll*A*inv[x-y]%mod;
    return A;
}

void UP(int &x,int y){x+=y;while(x>=mod)x-=mod;}

int main(){
    scanf("%d%d%d",&n,&m,&k);
    if(m==1){
        int Ans=pw(k,n);
        printf("%d\n",Ans);
        return 0;
    }
    *fac=1;For(i,1,k) fac[i]=1ll*fac[i-1]*i%mod;
    inv[k]=pw(fac[k],mod-2);
    Forn(i,k-1,0) inv[i]=1ll*inv[i+1]*(i+1)%mod;
    f[1][1]=1;
    For(i,1,n) For(j,1,i){
        UP(f[i+1][j],1ll*f[i][j]*j%mod);
        UP(f[i+1][j+1],1ll*f[i][j]*(j+1)%mod);
    }int Ans=0;
    For(A,0,n){
        For(B,0,n)if(A+B+B<=k){
            if(A+B>n)continue;
            int _=C(k,A);
            _=1ll*_*C(k-A,B)%mod;
            _=1ll*_*C(k-A-B,B)%mod;
            _=1ll*_*f[n][A+B]%mod;
            _=1ll*_*f[n][A+B]%mod;
            _=1ll*_*pw(A,(m-2)*n)%mod;
            UP(Ans,_);
        }
    }
    printf("%d\n",Ans);
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <iostream>
#define mod 1000000007
using namespace std;
typedef long long ll;

int n,m,k;

ll g[1000010],C[2010][2010],f[2010][2010],ln[2010];

ll ppow(ll a,ll b){
    ll ans = 1;

    while(b>0){
        if(b & 1LL){
            ans = ans * a % mod;
            b --;
        }else{
            a = a * a % mod;
            b /= 2;
        }
    }
    return ans;
}
int main(){
    C[0][0] = 1;
    for(int i=1;i<=2000;i++)
        for(int j=0;j<=i;j++)
            if(j == 0 || j == i)    C[i][j] = 1;
            else                    C[i][j] = (C[i-1][j] + C[i-1][j-1]) % mod;
    /*
    for(int j=1;j<=1000;j++)
        f[1][j] = 1;
    for(int i=2;i<=1000;i++)
        for(int j=i;j<=1000;j++)
            if(j == i)  f[i][j] = i * f[i-1][j-1] % mod;
            else        f[i][j] = ( f[i][j-1] * i % mod + f[i-1][j-1] * i % mod) % mod;
    */
    f[1][1] = 1;
    for(int i=2;i<=2000;i++)
        for(int j=1;j<=i;j++)
            if(j == 1)  f[i][j] = 1;
            else        f[i][j] = (f[i-1][j] * j % mod + f[i-1][j-1]) % mod;
    //for(int i=1;i<=5;i++)
        //printf("%d %d\n",i,f[i][i]);
    ln[0] = 1;
    for(int i=1;i<=2000;i++)
        ln[i] = (ln[i-1] * (ll)i) % mod;

    while(scanf("%d %d %d",&n,&m,&k) != EOF){
        g[0] = 1;
        for(int i=1;i<=k;i++)
            g[i] = (((g[i-1] * (k + 1 - i)) % mod) * ppow(i, mod -2)) % mod;

        if(m == 1){
            cout << ppow(k,n) << endl;
            continue;
        }
        ll ans = 0;
        for(int x = 1;x<=n && x<=k;x++)for(int y=0;y<=x;y++){
            if(x*2 - y > k )
                continue;
            if(y == 0 && m != 2)
                continue;
            ll ttemp = 1;
            ttemp = ttemp * g[2*x - y] % mod;
            ttemp = ttemp * C[2*x - y][y] % mod;
            ttemp = ttemp * C[2*x - 2*y][x-y] % mod;
            ttemp = ttemp * ppow(f[n][x],2) % mod;
            ttemp = ttemp * ppow(ln[x],2) % mod;
            //ttemp = ttemp * ppow(f[n][y],m-2) % mod;
            //ttemp = ttemp * ppow(ln[y],m-2) % mod;
            ttemp = ttemp * ppow(y,n * (m-2)) % mod;
            ans = (ans  + ttemp) % mod;
            //cout << ans << endl;
            //printf("%d %d : %d\n",x,y,ttemp);
        }
        cout << ans << endl;
    }
    return 0;
}

#include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <queue>
#include <memory.h>
#include <stack>
#define mp make_pair
#define pb push_back
#define setval(a,v) memset(a,v,sizeof(a))

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

using namespace std;

typedef long long int64;
typedef long double ld;

int dp[1100][1100];

const int MOD = 1000*1000*1000 + 7;

int calc(int n,int k){
    if (k > n)
        return 0;
    if (n == 0)
        return (k == 0);
    if (dp[n][k] != -1)
        return dp[n][k];
    return dp[n][k] = (k*1LL*(calc(n-1,k-1) + calc(n-1,k))) % MOD;
}

int pow(int a,int b){
    if (b == 0)
        return 1;
    if (b & 1)
        return (pow(a,b-1)*1LL*a)%MOD;
    int tmp = pow(a,b>>1);
    return (tmp*1LL*tmp) % MOD;
}

int f[1100*1100];
int invf[1100*1100];

int c(int n,int k){
    if (k > n || n < 0)
        return 0;
    return (((f[n] * 1LL *invf[k]) % MOD) *1LL* invf[n-k]) % MOD;
}

void init(){
    f[0] = 1;
    invf[0] = 1;
    for (int i = 1; i < 1000100; i++){
        f[i] = (f[i-1] * 1LL * i) % MOD;
        invf[i] = pow(f[i],MOD-2);
    }
    memset(dp,-1,sizeof(dp));
}

int main(){
  #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
  #endif
    init();

    int ans = 0;
    int n,m,k;

    scanf("%d %d %d",&n,&m,&k);

    if (m == 1){
        cout << pow (k,n) << endl;
        return 0;
    }

    //cerr << c(1,1) << endl;

    for (int i = 1; i <= n && i <= k; i++){
        int sum2 = 0;
        for (int l = 0; l <= i; l++)
            sum2 = (sum2 + ((c(i,l)*1LL*pow(l,n*(m-2)))%MOD)*1LL*c(k-i,i-l))%MOD;
        ans = (ans + ((sum2 * 1LL * ((c(k,i) *1LL* calc(n,i))%MOD))%MOD)*1LL*calc(n,i)) % MOD;
    }

    cout << ans << endl;

    return 0;
}

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int mod=1e9+7;
long long int d[1100],d1[1100],cc[1100][1100],f[3100],kk[3100],st[3100];

long long int pw(long long int s,int p){
	if(p==0)return 1;
	if(p==1)return s;
	long long int ans=pw(s,p/2);
	ans=(ans*ans)%mod;
	if(p%2==0)
		return ans;
	else
		return (ans*s)%mod;
}

void solve(int n){
	int b,i,j,q,w,k,t,m,h;
	long long int ans=0,c;
	scanf("%d%d",&m,&k);
	for(i=0;i<=1000;i++)d[i]=0;
	if(m==1){
		ans=1;
		for(i=0;i<n;i++)ans=(ans*k)%mod;
		printf("%I64d",ans);
		return;
	}
	for(i=0;i<=1000;i++){
		cc[i][0]=1;
		cc[0][i]=1;
	}
	for(i=1;i<=1000;i++)for(j=1;j<=1000;j++)
		cc[i][j]=(cc[i-1][j]+cc[i][j-1])%mod;
	d[0]=1;
	f[0]=1;
	kk[0]=1;
	st[0]=0;
	for(i=1;i<=3000;i++){
		f[i]=(f[i-1]*i)%mod;
		kk[i]=(kk[i-1]*(k-i+1))%mod;
		st[i]=pw(i,n*(m-2));
	}
	for(h=1;h<=n;h++){
		for(i=0;i<=h;i++){
			d1[i]=d[i]*i;
			if(i>0)d1[i]+=d[i-1];
			d1[i]%=mod;
		}
		for(i=0;i<=h;i++)d[i]=d1[i];
	}
	for(j=0;j<=n;j++)for(i=0;i+j<=n&&(j+2*i<=k);i++){
		c=(d[i+j]*d[i+j])%mod;
		c=(c*cc[i][j])%mod;
		c=(c*cc[i][j])%mod;
		c=(c*f[j])%mod;
		c=(c*kk[j+2*i])%mod;
		if(m>2)c=(c*st[j])%mod;
		ans=(ans+c)%mod;
	}
	printf("%I64d",ans);
}

int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif _DEBUG

	long long int n,m,x,y,i,j,q=0;
	while(scanf("%I64d",&n)!=EOF){
//	while(gets(c)){
		solve(n);
		printf("\n");
	}

	return 0;
}

/*
 * in the name of god
 *
 *
 *
 *
 *
 *
 *
 */

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <queue>
#include <complex>
#include <stack>
#include <deque>
#include <queue>
#include <iomanip>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef complex<double> point;
typedef long double ldb;

const int mod = 1000000007;
const int MAXN= 1000+10;
const int MAXF= 1000000+10;

int n,m,k;
int fact[MAXF],dfact[MAXF];
ll dp[MAXN][MAXN];

ll POWER (int base, int p){
	int ret=1,cur=base;
	while (p){
		if (p & 1)
			ret = (ll)ret * cur % mod;
		cur = (ll)cur * cur % mod;
		p>>=1;
	}
	return ret;
}

int getC (int n, int k){
	return (n<k || k<0) ? (0) : ((ll)fact[n]*dfact[k]%mod*dfact[n-k]%mod);
}

int main(){
	fact[0] = dfact[0] = 1;
	for (int i=1; i<MAXF; i++){
		fact[i] = (ll)fact[i-1] * i % mod;
		dfact[i]= POWER(fact[i],mod-2);
	}
	cin >> m >> n >> k;
	dp[0][0] = 1;
	for (int i=1; i<=m; i++)
		for (int j=1; j<=m; j++)
			dp[i][j] = ((ll)dp[i-1][j] * j + dp[i-1][j-1]) % mod;
	if (n==1){
		cout << POWER(k,m) << endl;
		return 0;
	}
	ll ret = 0;
	for (int i=0; 2*i<=k; i++)
		for (int j=0; 2*i+j<=k && i+j<=m; j++)
			ret = (ret + (ll)dp[m][i+j] * dp[m][i+j] % mod * POWER(j,(n-2)*m) % mod * getC(k,i) % mod * getC(k-i,j) % mod * getC(k-i-j,i) % mod * fact[i+j] % mod * fact[i+j]) % mod;
	cout << ret << endl;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define N 1000010
#define mod 1000000007
int dp[N],inv[N],fac[N];
inline int C(int m,int n) {
    return 1LL*fac[n]*inv[m]%mod*inv[n-m]%mod;
}
inline int read() {
    int x=0;
    char ch=getchar();
    while (!isdigit(ch)) ch=getchar();
    while (isdigit(ch)) x=x*10+ch-'0',ch=getchar();
    return x;
}
inline int Pow(int x,int y) {
    int res=1;
    while (y) {
        if (y&1) res=1LL*res*x%mod;
        x=1LL*x*x%mod,y>>=1;
    }
    return res;
}
int main() {
    int n=read(),m=read(),k=read();
    fac[0]=inv[0]=inv[1]=1;
    for (int i=1;i<N;i++) fac[i]=1LL*fac[i-1]*i%mod;
    for (int i=2;i<N;i++) inv[i]=1LL*(mod-mod/i)*inv[mod%i]%mod;
    for (int i=1;i<N;i++) inv[i]=1LL*inv[i-1]*inv[i]%mod;
    // puts("qwq");
    // cout<<C(2,4)<<endl;
    for (int i=1;i<=n;i++) {
        dp[i]=Pow(i,n);
        for (int j=1;j<=i-1;j++) {
            (dp[i]-=1LL*C(j,i)*dp[j]%mod)%=mod;
            if (dp[i]<0) dp[i]+=mod;
        }
    }
    int ans=0;
    // for (int i=1;i<=k;i++) printf("%d ",dp[i]);puts("");
    if (m==1) {
        return printf("%d\n",Pow(k,n)),0;
    }
    if (m==2) {
        // puts("qwq");
        for (int i=1;i<=n && i<=k;i++) {
            (ans+=1LL*dp[i]*dp[i]%mod*C(i,k)%mod*C(i,k)%mod)%=mod;
        }
        return printf("%d\n",ans),0;
    }
    // for (int i=1;i<=n;i++) printf("%d ",dp[i]);puts("");
    for (int i=1;i<=n && i<=k;i++) {
        int P=Pow(i,n*m-2*n);
        for (int j=0;j<=n && j<=k;j++) {
            if (i+j>n || i+2*j>k) break;
            // printf("%d %d %d\n",i,j,P);
            (ans+=1LL*C(i,k)*C(j,k-i)%mod*C(j,k-i-j)%mod*P%mod*dp[i+j]%mod*dp[i+j]%mod)%=mod;
        }
    }
    cout<<ans<<endl;
    return 0;
}

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cmath>
#include<algorithm>
#include<iostream>
#include<string>
using namespace std;
typedef long long LL;
const LL P=1000000007;
const int V=1200;
LL dp[V][V],F[V];
LL Pow(LL x,int y)
{
	LL ret=1;
	LL te=x;
	while(y>0)
	{
		if(y&1)ret=ret*te%P;
		te=te*te%P;y/=2;
	}
	return ret;
}
LL C[V][V];
void init()
{
	int i,j;
	C[1][0]=1;C[1][1]=1;
	for(i=2;i<=1010;i++)
	{
		C[i][0]=1;C[i][i]=1;
		for(j=1;j<i;j++)
		{
			C[i][j]=(C[i-1][j-1]+C[i-1][j])%P;
		}
	}
}
LL Ck[V][V],Ny[V];
LL find(int n,int i,int j,int k)
{
//	printf("Find : %d %d %d %d\n",n,i,j,k);
	return C[i][j]*Ck[i][i-j]%P;
}
int n,m,k,i,j;
int main()
{
	init();
	while(~scanf("%d%d%d",&n,&m,&k))
	{
		for(i=0;i<=n;i++)
		for(j=0;j<=n;j++)
		dp[i][j]=0;
		dp[1][1]=k;
		for(i=2;i<=n;i++)
		{
			for(j=1;j<=i;j++)
			{
				dp[i][j]=dp[i-1][j]*j%P;
				if(j<=k)
				{
					dp[i][j]+=dp[i-1][j-1]*(LL)(k-j+1)%P;
					dp[i][j]%=P;
				}
			}
		}
		LL ans=0;
		if(m==1)
		{
			for(i=1;i<=n;i++)
			{
				ans+=dp[n][i];
				ans%=P;
			}
			cout<<ans<<endl;
			continue;
		}
		else if(m==2)
		{
			for(i=1;i<=n;i++)
			{
				ans+=dp[n][i]*dp[n][i]%P;
				ans%=P;
			}
			cout<<ans<<endl;
			continue;
		}
		int free=n*(m-2);
		F[0]=0;
		for(i=0;i<=n;i++)Ny[i]=Pow(i,(int)P-2);
		for(i=1;i<=n;i++)
		{
			F[i]=Pow(i,free);
		}
		for(j=0;j<=min(k,n);j++)
		{
			Ck[j][0]=1;
			for(i=1;i<=n;i++)
			{
				Ck[j][i]=Ck[j][i-1]*(LL)(k-j-i+1)%P;
				Ck[j][i]*=Ny[i];
				Ck[j][i]%=P;
			}
		}
	//	for(j=0;j<=min(n,k);j++){for(i=1;i<=n;i++)printf("%I64d ",Ck[0][i]);puts("Ck");}
		for(i=1;i<=n;i++)
		{
			dp[n][i]*=Pow(Ck[0][i],(int)P-2);
			dp[n][i]%=P;
		}
	//	for(i=1;i<=n;i++)printf("%I64d ",dp[n][i]);puts("Dp");
		for(i=1;i<=n;i++)
		{
			for(j=0;j<=i;j++)
			{
				ans+=Ck[0][i]*dp[n][i]%P*dp[n][i]%P*find(n,i,j,k)%P*F[j]%P;
				ans%=P;
	//			printf("Cal : %d %d %I64d\n",i,j,ans);
			}
		}
		cout<<ans<<endl;
	}
}

#include <iostream>
using namespace std;
typedef long long LL;

const int MOD=1000000007;

LL fac[1100000],inv[1100000],f[1100];
LL ret=0;
int n,m,k,i,j;

LL pow(int a,int n){
        if (!n) return 1LL;
        LL ret=pow(a,n/2);
        ret=ret*ret%MOD;
        if (n%2) ret=ret*a%MOD;
        return ret;
}

LL com(int n,int m){
        return fac[n]*inv[m]%MOD*inv[n-m]%MOD;
}

LL calc(int x){
        if (f[x]!=-1) return f[x];
        LL ret=0,F=1;
        for(int i=x;i;i--){
                ret+=pow(i,n)*com(x,i)%MOD*F;
                ret%=MOD;
                F=-F;
        }
        if (ret<0) ret+=MOD;
        f[x]=ret;
        return ret;
}

int main(){
        cin>>n>>m>>k;
        if (m==1) {cout<<pow(k,n)<<endl;return 0;}
        fac[0]=inv[0]=1;
        for(i=1;i<=k;i++) fac[i]=fac[i-1]*i%MOD,inv[i]=inv[i-1]*pow(i,MOD-2)%MOD;
        for(i=0;i<=n;i++) f[i]=-1;
        for(i=0;i<=k&&i<=n;i++)for(j=0;i+j+j<=k&&i+j<=n;j++){
                LL tmp=calc(i+j);
                //cout<<i<<' '<<j<<' '<<ret<<endl;
                ret+=tmp*tmp%MOD*com(k,i)%MOD*com(k-i,j)%MOD*com(k-i-j,j)%MOD*pow(i,n*(m-2))%MOD;
                //cout<<i<<' '<<j<<' '<<ret<<endl<<endl;
                ret%=MOD;
        }
        cout<<ret;
}

// include stdc++.h slows down compilation much.
//#include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>

using namespace std;

#define USE_IOSTREAM \
{\
	ios::sync_with_stdio(false);\
	cin.tie(0);\
	cout.tie(0);\
}

#define pii pair<int, int>
#define mp make_pair

typedef long long ll;

const ll MOD = 1e9 + 7;
const int N = 1e6 + 100;

ll fact[N];
ll inv[N];
ll dp[1005][1005];

ll mypow(ll a, ll b)
{
	if (!b)
	{
		return 1;
	}
	return (b & 1) ? a * mypow(a * a % MOD, b >> 1) % MOD : mypow(a * a % MOD, b >> 1);
}

ll comb(int a, int b)
{
	if (b < 0 || b > a || a < 0)
	{
		return 0;
	}

	if (!b)
	{
		return 1;
	}
	ll res = fact[a] * inv[b] % MOD * inv[a - b] % MOD;
	return res;
}

int main()
{
	// USE_IOSTREAM;
	int n, m, i, j, colorNum;
	cin >> n >> m >> colorNum;

	fact[0] = inv[0] = 1;
	for (i = 1; i < N; i++)
	{
		fact[i] = fact[i - 1] * i % MOD;
		inv[i] = mypow(fact[i], MOD - 2);
	}

	if (m == 1)
	{
		cout << mypow(colorNum, n) << endl;
		return 0;
	}

	dp[0][0] = 1;
	for (i = 1; i <= n; i++)
	{
		for (j = 1; j <= i; j++)
		{
			dp[i][j] = (j * dp[i - 1][j] + dp[i - 1][j - 1]) % MOD;
		}
	}
	for (i = 1; i <= n; i++)
	{
		for (j = 1;j <= n; j++)
		{
			dp[i][j] = dp[i][j] * fact[j] % MOD;
		}
	}

	ll ans = 0;
	for (i = 1; i <= n && i <= colorNum; i++)
	{
		int start = m == 2 ? 0 : 1;
		for (j = start; j <= i; j++)
		{
			ll cur = comb(colorNum, 2*i - j) * comb(2*i - j, i) % MOD * comb(i, j) % MOD;
			cur = cur * mypow(j, n * (m - 2)) % MOD;
			cur = cur * dp[n][i] % MOD * dp[n][i] % MOD;

			ans = (ans + cur) % MOD;
		}
	}

	cout << ans << endl;
	return 0;
}

#include <ctime>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>

#include <algorithm>
#include <iostream>
#include <bitset>
#include <vector>
#include <queue>
#include <map>
#include <set>

using namespace std;

const bool debug = false;

const int module = 1000000007, maxk = 1100000;

long long fact[maxk + 1], invfact[maxk + 1], paint[maxk + 1];
int n, m, k;

long long power(long long x, int y)
{
	if (y == 0) return 1;
	long long answer = power(x, y / 2);
	answer = answer * answer % module;
	if (y & 1) answer = answer * x % module;
	return answer;
}

inline long long C(int n, int k)
{
	return fact[n] * invfact[k] % module * invfact[n - k] % module;
}

int main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	cin >> n >> m >> k;
	fact[0] = 1, invfact[0] = 1;
	for (int i = 1; i <= k; i++)
		fact[i] = fact[i - 1] * i % module,
		invfact[i] = power(fact[i], module - 2);
	paint[1] = 1;
	for (int i = 2; i <= min(n, k); i++)
	{
		paint[i] = power(i, n);
		for (int j = 1; j < i; j++)
		{
			paint[i] -= C(i, j) * paint[j] % module;
			if (paint[i] < 0) paint[i] += module;
		}
	}
	if (debug)
	{
		for (int i = 1; i <= min(n, k); i++)
			cerr << paint[i] << " ";
		cerr << endl;
	}
	long long answer = 0;
	if (m == 1)
	{
		cout << power(k, n);
		return 0;
	}
	if (m == 2)
	{
		long long answer = 0;
		for (int i = 1; i <= min(n, k); i++)
			answer += paint[i] * paint[i] % module * C(k, i) % module * C(k, i),
			answer %= module;
		cout << answer;
		return 0;
	}
	for (int common = 1; common <= min(n, k); common++)
		for (int add = 0; 2 * add + common <= k && common + add <= n; add++)
		{
			long long x = power(common, n * (m - 2));
			long long y = paint[common + add] * paint[common + add] % module;
			long long z = C(k, common) * C(k - common, add) % module * C(k - common - add, add) % module;
			answer += x * y % module * z % module;
			answer %= module;
		}
	cout << answer;
	return 0;
}

#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<set>
#include<stack>
#include<map>
#include<vector>
#include<queue>
#include<algorithm>
using namespace std;

typedef long long int64;
const int mod=1000000007;

#define maxn 1005
int64 dp[maxn][maxn];

int64 mul[maxn*maxn]={1};//mul[i]=i!

void e_gcd(int64 a,int64 b,int64 &x,int64 &y) {//扩展欧几里得定理：解ax+by==1。
    if( !b ){
        x=1; y=0;
    }
    else{
        e_gcd(b,a%b,x,y);
        int64 temp=x;
        x=y;  y=temp-a/b*y;
    }
}
//算逆元,注意***对一个负数取逆元是没有意义的
int64 get_ni(int64 a,int64 p){ //返回x,ax=1 (mod p) p是素数
    int64 x,y;  e_gcd(a,p,x,y);
    return x;
}
inline int64 C(int n,int m){
    if( m>n ) return 0;
    return ((int64)mul[n]*get_ni(mul[m],mod)%mod * get_ni(mul[n-m],mod)%mod + mod)%mod;
}

void add(int64 &a,int64 b){
	a=(a+b)%mod;
}
void init(){
	for(int i=1;i<=1000003;i++) mul[i]=(int64)mul[i-1]*i%mod;
	dp[1][1]=1;
	for(int i=1;i<maxn-1;i++){
		for(int j=1;j<maxn-1;j++){
			add(dp[i+1][j],(int64)dp[i][j]*j%mod);
			add(dp[i+1][j+1],dp[i][j]);
		}
	}
}

int64 power(int a,int b){
	int64 ret=1,A=a;
	while( b ){
		if( b&1 ) ret=ret*A%mod;
		A=A*A%mod;
		b>>=1;
	}
	return ret;
}

int main(){
	int n,m,k;
	init();
	while( cin>>n>>m>>k ){
		int64 ans=0;
		if( m==1 ){
			ans=power(k,n*m);
			ans=(ans+mod)%mod;
			cout<<ans<<'\n';
			continue;
		}
		for(int s=1;s<=min(n,k);s++){
			for(int com=0;com<=s;com++){
				int64 tmp=(int64)C(k,s) * C(s,com)%mod * C(k-s,s-com)%mod;
				tmp=tmp*dp[n][s]%mod*mul[s]%mod * dp[n][s]%mod*mul[s]%mod * power(com,n*m-2*n)%mod;
				ans=(ans+tmp)%mod;
			}
		}
		ans=(ans+mod)%mod;
		cout<<ans<<'\n';
	}
	return 0;
}

#include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <algorithm>

#define MOD 1000000007

using namespace std;

long long P[1010];
long long PP[1010];
long long NCR[2010];
long long NCR2[2010][2010];

long long mexp(long long x, long long p) {
  long long ret = 1;
  for(int i = 63 - __builtin_clzll(p); i >= 0; i--) {
    ret = (ret * ret) % MOD;
    if(p & 1ll << i) ret = (ret * x) % MOD;
  }
  return ret;
}

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

  P[0] = 0;
  for(int i = 1; i < 1010; i++) {
    P[i] = 1;
    for(int j = 0; j < N; j++) {
      P[i] = (P[i] * i) % MOD;
    }
  }
  for(int i = 0; i < 1010; i++) {
    PP[i] = 1;
    for(int j = 2; j < M; j++) {
      PP[i] = (PP[i] * P[i]) % MOD;
    }
  }
  for(int i = NCR2[0][0] = 1; i < 2010; i++) {
    for(int j = NCR2[i][0] = NCR2[i][i] = 1; j < 2010; j++) {
      NCR2[i][j] = (NCR2[i - 1][j - 1] + NCR2[i - 1][j]) % MOD;
    }
  }

  for(int i = NCR[0] = 1; i <= K && i < 2010; i++) {
    NCR[i] = (NCR[i - 1] * (K - i + 1)) % MOD;
    NCR[i] = (NCR[i] * mexp(i, MOD - 2)) % MOD;
  }

  if(M == 1) {
    long long res = 1;
    for(int i = 0; i < N; i++) res = (res * K) % MOD;
    cout << res << endl;
    return 0;
  }

  long long res = 0;
  for(int i = 1; i <= K && i <= N; i++) {
    long long base = 0;
    for(int j = 1; j <= i; j++) {
      long long v = (P[j] * NCR2[i][j]) % MOD;
      if((i - j) % 2 == 0) base = (base + v) % MOD;
      else base = (base + MOD - v) % MOD;
    }
    for(int olp = 0; olp <= i; olp++) {
      if(2 * i - olp > K) continue;

      //long long num = ((P[i] - P[i - 1] * i) % MOD + MOD) % MOD;
      long long num = base;
      num = (num * num) % MOD;
      num = (num * PP[olp]) % MOD;
      num = (num * NCR[2 * i - olp]) % MOD;
      num = (num * NCR2[2 * i - olp][i]) % MOD;
      num = (num * NCR2[i][olp]) % MOD;

      res = (res + num) % MOD;
    }
  }

  cout << res << endl;
}

#include <bits/stdc++.h>
using namespace std;

using ll = long long;

#define N 1000005
#define M 1005

int n, m, k, dp[2][M], a[M];

const int mod = 1e9 + 7;

int inv[N] = {0, 1}, fac[N] = {1, 1}, rfac[N] = {1, 1};

int C(int n, int m) {
	if (m<0||m>n) return 0;
	return 1ll * fac[n] * rfac[n-m] % mod * rfac[m] % mod;
}

void init() {
	for (int i = 2; i < N; i ++) {
		fac[i] = 1ll * fac[i-1] * i % mod;
		inv[i] = 1ll * (mod / i) * (mod - inv[mod % i]) % mod;
		rfac[i] = 1ll * rfac[i-1] * inv[i] % mod;
	}
	return;
}

void add(int &x, int y) {
	x += y;
	if (x >= mod) x -= mod;
}
int mul(int x, int y) {
	return 1ll * x * y % mod;
}

int expmod(int a, int b, int mod) {
    int res = 1;
    for ( ; b; b >>= 1) {
        if (b&1) res = 1ll * res * a % mod;
        a = 1ll * a * a % mod;
    }
    return res;
}

int main() {
	init();
	scanf("%d %d %d", &n, &m, &k);
    dp[0][0] = 1;
    int u = 0, v = 1;
	int up = min(n, k);
    for (int i = 1; i <= n; i ++) {
        dp[v][0] = 0;
        for (int j = 1; j <= up; j ++) {
            int &res = dp[v][j];
            res = 0;
            add(res, mul(dp[u][j], j));
            add(res, dp[u][j-1]);
        }
        swap(u, v);
    }
    for (int i = 1; i <= up; i ++) {
		dp[u][i] = mul(dp[u][i], fac[i]);
        dp[u][i] = mul(dp[u][i], dp[u][i]);
    }
    int ans = 0;
    if (m == 1) {
		ans = expmod(k, n, mod);
    }
    else {
        int pw = n * m - 2 * n;
		for (int i = 0; i <= up; i ++) {
			dp[v][i] = expmod(i, pw, mod);
            a[i] = C(k, i);
		}
        for (int tot = 1; tot <= up; tot ++) {
            for (int com = 0; com <= tot; com ++) {
                if (2*tot - com > k) continue;
                int rlt = mul(a[com], C(k-com, tot-com));
				rlt = mul(rlt, C(k-tot, tot-com));
                rlt = mul(rlt, dp[u][tot]);
                rlt = mul(rlt, dp[v][com]);
				add(ans, rlt);
            }
        }
    }
    cout << ans << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

const int mod = 1e9 + 7;

int expmod(int x, ll y) {
    int r = 1;
    while(y > 0) {
        if(y & 1) r = 1ll * r * x % mod;
        x = 1ll * x * x % mod;
        y >>= 1;
    }
    return r;
}

#define N 1010
#define M 1000010

int f[M], r[M], a[N], b[N];

int C(int n, int m) {
    return 1ll * f[n] * r[m] % mod * r[n-m] % mod;
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    f[0] = 1;
    for(int i = 1; i < M; i ++) f[i] = 1ll * f[i-1] * i % mod;
    r[M-1] = expmod(f[M-1], mod-2);
    for(int i = M-1; i; i --) r[i-1] = 1ll * r[i] * i % mod;
    int n, m, k;
    cin >> n >> m >> k;
    if(m == 1) {
        cout << expmod(k, n) << endl;
        return 0;
    }
    for(int j = 1; j <= n; j ++) {
        a[j] = expmod(j, n);
        for(int h = 1; h < j; h ++) a[j] = (a[j] - 1ll * C(j, h) * a[h]) % mod;
        if(a[j] < 0) a[j] += mod;
    }
    for(int i = 1; i <= n; i ++) a[i] = 1ll * a[i] * a[i] % mod;
    for(int i = 0; i <= n; i ++) b[i] = expmod(i, 1ll * (m-2) * n);
    int ans = 0;
    for(int x = 0; x <= n; x ++) for(int y = 0; x+y <= n; y ++) {
        if(2*x+y > k) continue;
        ans = (1ll*f[k]*r[x]%mod*r[x]%mod*r[y]%mod*r[k-2*x-y]%mod
                  *a[x+y]%mod*b[y]
                  +ans) % mod;
    }
    cout << ans << endl;
}

#include<bits/stdc++.h>
using namespace std;

typedef long long ll;

const int mod = 1e9 + 7;

int expmod(int x, ll y) {
    int r = 1;
    while(y > 0) {
        if(y & 1) r = 1ll * r * x % mod;
        x = 1ll * x * x % mod;
        y >>= 1;
    }
    return r;
}

#define N 1010
#define M 1000010

int f[M], r[M], a[N];

int C(int n, int m) {
    return 1ll * f[n] * r[m] % mod * r[n-m] % mod;
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    f[0] = 1;
    for(int i = 1; i < M; i ++) f[i] = 1ll * f[i-1] * i % mod;
    r[M-1] = expmod(f[M-1], mod-2);
    for(int i = M-1; i; i --) r[i-1] = 1ll * r[i] * i % mod;
    int n, m, k;
    cin >> n >> m >> k;
    if(m == 1) {
        cout << expmod(k, n) << endl;
        return 0;
    }
    for(int j = 1; j <= n; j ++) {
        a[j] = expmod(j, n);
        for(int h = 1; h < j; h ++) a[j] = (a[j] - 1ll * C(j, h) * a[h]) % mod;
        if(a[j] < 0) a[j] += mod;
    }
    int ans = 0;
    for(int x = 0; x <= n; x ++) for(int y = 0; x+y <= n; y ++) {
        if(2*x+y > k) continue;
        ans = (1ll*f[k]*r[x]%mod*r[x]%mod*r[y]%mod*r[k-2*x-y]%mod
                  *a[x+y]%mod*a[x+y]%mod
                  *expmod(y, 1ll*(m-2)*n)
                  +ans) % mod;
    }
    cout << ans << endl;
}

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[1000005];
int n,m,k;

void init(){
    int i,j;
    fac[0]=1;
    for(i=1;i<1000005;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

lld Cal(int x,int y){
    lld tmp=fac[x]*Mul(fac[x-y]*fac[y]%mod,mod-2)%mod;
    return tmp;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1])%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }
        lld ans=0;
        if(m==1){
            printf("%I64d\n",Mul(k,n));
        }else{
            for(i=1;i<=n && i<=k;i++){//最左最右个有i
                for(j=(m!=2);j<=i;j++)//都有的j
                    if(k>=2*i-j){
                    lld tp=Cal(k,j)*Mul(j,n*(m-2))%mod;
                    lld tf=Cal(k-j,i-j)*Cal(k-i,i-j)%mod;
                    lld tg=((dp[n][i]*dp[n][i]%mod)*(fac[i]*fac[i]%mod))%mod;
                    ans=(ans+((tp*tf%mod)*tg%mod))%mod;
                }
            }
            printf("%I64d\n",ans);
        }

    }
    return 0;
}

#define CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <iostream>
#include <set>
#include <map>
#include <queue>
#include <stdlib.h>
#include <string>
#include <string.h>
#include <memory.h>
#include <algorithm>
#include <math.h>
using namespace std;

typedef long long li;
typedef long double ld;
typedef pair <int, int> pi;
typedef pair <li, li> pli;
typedef vector <int> vi;
typedef vector <li> vli;
#define mp make_pair
#define pb push_back
void solve ();
int main ()
{
#ifdef _DEBUG
	freopen ("in.txt", "r", stdin);
#endif
	int t=1;
	while (t--)
		solve ();
	return 0;
}
//caution: is int really int?
#define int li
int MOD=1000000007;
int n, m, k;
li dp[2000][2000];
int bp (int q, int w)
{
	if (w==0)
		return 1;
	if (w%2)
		return (q*bp (q, w-1))%MOD;
	int u=bp (q, w/2);
	return (u*u)%MOD;
}
int c (int q, int w)
{
	if (q<w)
		return 0;
	if (w<0)
		return 0;
	int verh=1;
	for (int i=q; i>q-w; i--)
	{
		verh*=i; verh%=MOD;
	}
	int niz=1;
	for (int i=2; i<=w; i++)
	{
		niz*=i; niz%=MOD;
	}
	int dom=bp ( niz, MOD-2 );
	return (dom*verh)%MOD;
}
void solve ()
{
	//freopen ("out.txt", "w", stdout);
	cin>>n>>m>>k;
	dp[0][0]=1LL;
	for (int i=0; i<n; i++)
		for (int j=0; j<=i; j++)
		{
			int cur=dp[i][j];
			dp[i+1][j]+=j*dp[i][j]; dp[i+1][j]%=MOD;
			dp[i+1][j+1]+=dp[i][j]; dp[i+1][j+1]%=MOD;
		}
	for (int i=0; i<=n; i++)
	{
		int cur=1;
		for (int j=0; j<=i; j++)
		{
			dp[i][j]*=cur;
			cur*=(j+1); cur%=MOD;
			dp[i][j]%=MOD;
		}
	}
	if (m==1)
	{
		li ans=1;
		for (int i=0; i<n; i++)
		{
			ans*=k; ans%=MOD;
		}
		cout<<ans;
		return;
	}

	if (m==2)
	{
		int answer=0;
		for (int l=1; l<=n && l<=k; l++)
		{
			int u=c(k, l);
			int now=u*u%MOD;
			now*=dp[n][l]; now%=MOD;
			now*=dp[n][l]; now%=MOD;
			answer+=now; answer%=MOD;
		}
		cout<<answer;
		return;
	}
	int ans=0;
	int z=1;
	for (int cur=1; cur<=k && cur<=n; cur++)
	{
		int thing=c(k, cur);
		for (int l=cur; l<=k && l<=n; l++)
			if (2*l-cur>k)
				break;
			else
		{
			int dob;
			//int z=c(k-cur, l-cur);
			//int p=c(k-l, l-cur);
			//int u=c(k, cur);
			dob=thing;
			dob*=dp[n][l]; dob%=MOD;
			dob*=dp[n][l]; dob%=MOD;
			dob*=bp (cur, (m-2)*n); dob%=MOD;
			ans+=dob; ans%=MOD;
			//if (l==cur)
			//cout<<l-cur<<" "<<cur<<endl<<dp[n][l]<<endl;
			thing*=(k-2*l+cur-1); thing%=MOD; thing*=(k-2*l+cur); thing%=MOD; thing*=bp (l+1-cur, 2*MOD-4); thing%=MOD;
		}
	}
	cout<<ans;
}

#include <iostream>
#include <fstream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iomanip>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <sstream>
#include <string>
#include <vector>
using namespace std;

#define EPS 1e-9
#define INF 1e9
#define MOD 1000000007LL
#define iss istringstream
#define ll long long
#define rep(i,n) rep2(i,0,n)
#define rep2(i,m,n) for(ll i=m;i<n;i++)
#define pi pair<ll,ll>
#define pb push_back
#define sz size()
#define vi vector<ll>
#define vc vector
#define vs vector<string>

ll fact[1000001];

ll extgcd(ll a,ll b,ll& x, ll& y){
	ll d=a;
	if(b)d=extgcd(b,a%b,y,x),y-=(a/b)*x;
	else x=1,y=0;
	return d;
}

ll mod_inverse(ll a,ll m){
	ll x,y;
	extgcd(a,m,x,y);
	return ((ll)m+x%m)%m;
}

ll mod_fact(ll n,ll& e){
	e=0;
	if(!n)return 1;
	ll res=mod_fact(n/MOD,e);
	e+=n/MOD;
	if(n/MOD%2)return (ll)res*(MOD-fact[n%MOD])%MOD;
	return (ll)res*fact[n%MOD]%MOD;
}

ll mod_C(ll n,ll k){
	if(n<0||k<0||n<k)return 0;
	ll e1,e2,e3;
	ll a1=mod_fact(n,e1),a2=mod_fact(k,e2),a3=mod_fact(n-k,e3);
	if(e1>e2+e3)return 0;
	return (ll)a1*mod_inverse(a2*a3%MOD,MOD)%MOD;
}

ll mod_pow(ll x,ll n){
	ll res=1;
	while(n){
		if(n&1)res=res*x%MOD;
		x=x*x%MOD;
		n/=2;
	}
	return res;
}

ll n,m,k,c[1001],p[1001],ans;

int main(){
	fact[0]=1;
	rep(i,1000000)fact[i+1]=((ll)fact[i]*(i+1))%MOD;
	cin>>n>>m>>k;
	if(m==1){cout<<mod_pow(k,n);return 0;}
	rep2(i,1,n+1){
		p[i]=mod_pow(i,n);
		rep2(j,1,i)p[i]=(MOD*MOD+p[i]-mod_C(i,j)*p[j])%MOD;
		c[i]=(p[i]*mod_C(k,i))%MOD;
	}
	if(m==2){
		rep2(i,1,n+1)ans=(ans+c[i]*c[i])%MOD;
		cout<<ans;return 0;
	}
	rep2(i,1,n+1){
		rep2(j,1,i+1){
			ll x=(mod_C(k,j)*mod_C(k-j,i-j))%MOD;
			x=(x*mod_C(k-i,i-j))%MOD;
			x=(x*p[i])%MOD;
			x=(x*p[i])%MOD;
			x=(x*mod_pow(j,n*(m-2)));
			ans=(ans+x)%MOD;
		}
	}
	cout<<ans;
}

// IN THE NAME OF ALLAH
#include <math.h>
#include <vector>
#include <set>
#include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include<cstring>
#include <cstdlib>
#include <string>
#include <ctime>
#include <cstdio>
#include <cmath>

#define int ll

#define F first
#define S second
#define mp make_pair
#define Left(x) (2*(x))
#define Right(x) ((2*(x))+1)
#define pii pair<int , int>

using namespace std;
typedef long long ll;

const int N = 1e6 + 5 , MOD = 1e9 + 7 , MAXN = 1e5 , LG = 20 , M = 1e7 , P = 727 , Sq = 100;
const ll inf = 1e18 + 10;

int fac[N] , inv[N] , dp[1012][1012] , ans = 0;

int pw(int a , int b){
      if(!b) return 1;
      int tmp = pw(a , b/2);
      tmp = 1ll*tmp*tmp % MOD;
      if(b % 2) tmp = 1ll*tmp*a % MOD;
      return tmp;
}
int ENT(int a , int b){
      if(a > b) return 0;
      if(a == b || !a) return 1;
      int ret = 1ll*fac[b]*inv[a] % MOD;
      ret = 1ll*ret*inv[b - a] % MOD;
      return ret;
}
int32_t main(){
      fac[0] = 1;
      for(int i = 1 ; i < N ; i++) fac[i] = 1ll*fac[i - 1]*i % MOD;
      inv[N - 1] = pw(fac[N - 1] , MOD-2);
      for(int i = N - 2 ; i >= 1 ; i--) inv[i] = 1ll*inv[i + 1]*(i + 1) % MOD;

      int n , m , k; cin>>n>>m>>k;
      dp[0][0] = 1;
      for(int i = 1 ; i <= n ; i++)
            for(int j = 1 ; j <= i ; j++)
                  dp[i][j] = (dp[i - 1][j - 1] + dp[i - 1][j]) % MOD * j % MOD;

      if(m == 1) return cout<<pw(k , n) , 0;
      for(int i = 1 ; i <= min(k , n) ; i++)
            for(int j = 0 ; j <= i ; j++)
                  ans = (ans + 1ll * dp[n][i] * dp[n][i] % MOD * pw(j , n*(m - 2)) % MOD * ENT(i , k) % MOD * ENT(i - j , k - i) % MOD * ENT(j , i) % MOD) % MOD;

      return cout<<ans , 0;
}

#include<iostream>
#include<vector>
#include<sstream>
#include<algorithm>
#include<numeric>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<complex>
#include<set>
#include<map>
#include<queue>
#include<cassert>

using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(c).size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(),(c).end()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pi;
typedef long long ll;

const int inf=1<<28;
const double INF=1e12,EPS=1e-9;

const int mod=(int)1e9+7;
int n,m,k;
int dp[1001][1001];

inline int pow(int n,int m){
	int res=1;
	for(;m;m>>=1){
		if(m&1)res=(ll)res*n%mod;
		n=(ll)n*n%mod;
	}
	return res;
}
int room(int m,int r){
	int &res=dp[m][r];
	if(res>=0)return res;
	if(m==0||r==0)return m==0&&r==0;
	return res=(ll)r*(room(m-1,r-1)+room(m-1,r))%mod;
}
int fact[1000001];
int extgcd(int a,int b,int &x,int &y){
	int d=a;
	if(b!=0){
		d=extgcd(b,a%b,y,x);
		y-=a/b*x;
	}
	else x=1, y=0;
	return d;
}
int inv(int n){
	int x,y;
	extgcd(n,mod,x,y);
	return (x%mod+mod)%mod;
}
int C(int n,int k){
	return (ll)fact[n]*inv(fact[n-k])%mod*inv(fact[k])%mod;
}
/*
int room2(int m,int r){
	ll res=0,sign=1;
	rep(k,r+1){
		res+=sign*(ll)C[r][k]*pow(r-k,m)%mod;
		sign*=-1;

	}
	return (res%mod+mod)%mod;
}
*/
void run()
{
	cin>>n>>m>>k;
	if(m==1){
		cout<<pow(k,n)<<endl;
		return;
	}
	memset(dp,-1,sizeof(dp));
	fact[0]=1;
	rep(i,1000000)fact[i+1]=fact[i]*(i+1ll)%mod;

	int ans=0;
	for(int a=0;a<=min(n,k);a++)for(int b=max(1,a);b<=n&&2*b-a<=k;b++){
		ll tmp=(ll)C(k,a)*C(k-a,b-a)%mod*C(k-b,b-a)%mod;
		tmp=tmp*room(n,b)%mod*room(n,b)%mod;
		tmp=tmp*pow(a,n*(m-2))%mod;
		ans=(ans+tmp)%mod;
	}
	cout<<ans<<endl;
}

int main()
{
#ifndef ONLINE_JUDGE
	int cs=3;rep(i,cs)
#endif
	run();
}

#pragma comment(linker, "/STACK:60000000")
#define _CRT_SECURE_NO_WARNINGS

#include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <sstream>
#include <iomanip>
#include <complex>
#include <queue>
#include <functional>

using namespace std;

#define next NEXT
#define prev PREV
#define forn(i, n) for(int i = 0; i < (int)(n); i++)
#define ford(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define last(a) int(a.size() - 1)
#define all(a) a.begin(), a.end()
#define seta(a,x) memset (a, x, sizeof (a))
#define I (int)
#define y1 botva

typedef long long int64;
typedef pair <int, int> pii;
typedef long double ldb;

const long double eps = 1e-9;
const int inf = (1 << 30) - 1;
const int64 inf64 = ((int64)1 << 62) - 1;
const long double pi = 3.1415926535897932384626433832795;

template <class T> T sqr (T x) {return x * x;}

const int NMAX = 1005;
const int P = 1000000007;

int n, m, k;
int64 f[NMAX * NMAX];

int64 power(int64 x, int64 st)
{
    int64 res = 1;
    while (st > 0)
    {
        if (st & 1) res = (res * x) % P;
        st >>= 1;
        x = (x * x) % P;
    }
    return res;
}

int64 calc(int n, int k, int zn)
{
	return power(k, n);
}

int64 C(int n, int m)
{
    if (n < m) return 0;
    return (f[n] * ((power(f[m], P - 2) * power(f[n - m], P - 2)) % P)) % P;
}

int64 /*D[NMAX][NMAX], */c[NMAX][NMAX], D2[NMAX][NMAX];

int main ()
{
    //freopen ("input.txt", "r", stdin);
    //freopen ("output.txt", "w", stdout);

	cin >> m >> n >> k;
	if (n == 1)
    {
        cout << power(k, m) << endl;
        return 0;
    }
    f[0] = 1;
    forn(i, max(n * m, k))
		f[i + 1] = (f[i] * (i + 1)) % P;

    forn(i, m + 1)
    {
        c[i][0] = 1;
        forn(j, i)
			c[i][j + 1] = (c[i - 1][j + 1] + c[i - 1][j]) % P;
    }

    cerr << clock() << endl;
/*    forn(i, m + 1)
        forn(j, m + 1)
        {
            if (i == 0) D[i][j] = 1;
            else if (j == 0) D[i][j] = 0;
            else
            {
                D[i][j] = 0;
                for (int f = 1; f <= i - j + 1; ++f)
                    D[i][j] = (D[i][j] + D[i - f][j - 1] * c[i][f]) % P;
            }
        }*/

	seta(D2, 0);
	D2[1][1] = 1;
    forn(i, m + 1)
        forn(j, i + 1)
			if (D2[i][j] > 0)
			{
				D2[i + 1][j] = (D2[i + 1][j] + D2[i][j] * j) % P;
				D2[i + 1][j + 1] = (D2[i + 1][j + 1] + D2[i][j]) % P;
				D2[i][j] = (D2[i][j] * f[j]) % P;
			}

//	forn(i, m + 1)
//		forn(j, m + 1)
//			if (i && j) assert(D2[i][j] == D[i][j]);
    cerr << clock() << endl;

	int64 ans = 0;
	forn(i, min(k, m) + 1)
		if (i)
		{
			forn(j, i + 1)
			{
				int64 res = calc((n - 2) * m, j, i);
				res = (res * D2[m][i]) % P;
				res = (res * D2[m][i]) % P;
				int64 now = (C(k - i,i - j) * ((C(k,j) * C(k - j,i - j)) % P)) % P;
				ans = (ans + (res * now)) % P;
			}
		}
	cout << ans << endl;
	cerr << clock() << endl;

	return 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

const long long MOD = 1000000007;

int n, m, color;
long long C[1005][1005], F[1000005], f[1000005], sum, ret;

long long power(long long x, int y){
	if (y == 1) return x % MOD;
	long long t = power(x, y>>1);
	if (y & 1) return (((t * t) % MOD) * x ) % MOD;
	else return (t * t) % MOD;
}

long long egcd(long long x, long long y, long long &a, long long &b){
	if (!y){
		a = 1;
		b = 0;
		return x;
	}
	else{
		long long t=egcd(y, x%y, b, a);
		b -= x/y * a;
		return t;
	}
}

long long inverse(long long x, long long m){
	long long a, b;
	egcd(x, m, a, b);
	a %= m;
	if (a < 0) a += m;
	return a;
}

long long choose(long long x, long long y){
	return ((F[x] * f[y]) % MOD * f[x-y]) % MOD;
}

int main(){
	scanf("%d%d%d", &n, &m, &color);

	C[0][0] = 1;
	for (int i=0; i<n; i++){
		for (int j=0; j<=n; j++){
			C[i+1][j] = (C[i+1][j] + C[i][j] * j) % MOD;
			C[i+1][j+1] = (C[i+1][j+1] + C[i][j] * (color-j)) % MOD;
		}
	}

	F[0] = 1;
	for (int i=1; i<=color; i++) F[i] = (F[i-1] * i) % MOD;
	for (int i=0; i<=color; i++) f[i] = inverse(F[i], MOD);

	for (int i=1; i<=n && i<=color; i++){
		if (m == 1) ret = (ret + C[n][i]) % MOD;
		else if (m == 2){
			ret += (C[n][i] * C[n][i]) % MOD;
			ret %= MOD;
		}
		else{
			sum = power(C[n][i], m);
			sum *= power(inverse(choose(color, i), MOD), m-1);
			sum %= MOD;
			ret = (ret + sum) % MOD;
		}
	}

	printf("%I64d\n", ret);
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const int mod = (int) 1e9 + 7;

int add(int a, int b) {
  a += b;
  if (a >= mod) {
    return a - mod;
  }
  if (a < 0) {
    return a + mod;
  }
  return a;
}

int mul(int a, int b) {
  return a * (ll) b % mod;
}

int pw(int a, int b) {
  int r = 1;
  while (b) {
    if (b & 1) {
      r = mul(r, a);
    }
    a = mul(a, a);
    b /= 2;
  }
  return r;
}

int sqr(int a) {
  return mul(a, a);
}

const int N = 1000 + 7;
int dp[N][N], f[N], c[N][N];

void build() {
  f[0] = dp[0][0] = c[0][0] = 1;
  for (int i = 1; i < N; i++) {
    c[i][0] = 1;
    for (int j = 1; j <= i; j++) {
      dp[i][j] = add(mul(j, dp[i - 1][j]), dp[i - 1][j - 1]);
      c[i][j] = add(c[i - 1][j], c[i - 1][j - 1]);
    }
    f[i] = mul(f[i - 1], i);
  }
}

int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);

  build();
  int n, m, k;
  cin >> n >> m >> k;
  if (m == 1) {
    cout << pw(k, n) << "\n";
    return 0;
  }
  int sol = 0;
  for (int x = 0; x <= n; x++) {
    for (int y = 0; y <= x; y++) {
      if (2 * x - y <= k) {
        int a = mul(c[k][y], c[k - y][x - y]);
        int b = pw(y, n * (m - 2));
        int c = sqr(mul(dp[n][x], f[x]));
        int p = mul(a, mul(b, c));
        sol = add(sol, p);
      }
    }
  }
  cout << sol << "\n";
}

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[maxn];
int n,m,k;

void init(){
    int i,j,k;
    memset(C,0,sizeof(C));
    for(i=1;i<maxn;i++)
        C[i][0]=C[i][i]=1;
    for(i=1;i<maxn;i++)
        for(j=1;j<i;j++){
            C[i][j]=(C[i-1][j]+C[i-1][j-1])%mod;
        }
    fac[0]=1;
    for(i=1;i<maxn;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=k && j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1]*(k-j+1))%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }
        lld ans=0;
        for(i=1;i<=k && i<=n;i++){
            ans+=Mul(i,n*(m-2))*(dp[n][i]*dp[n][i]%mod)%mod;
        }
        printf("%I64d\n",ans);
    }
    return 0;
}

#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

#include <bits/stdc++.h>

using namespace std;

#define fo(i, a, b) for(int i = a; i <= b; i++)
#define _fo(i, a, b) for(int i = a; i >= b; i--)
#define foa(i, a) for (auto &i : a)
#define sz(a) ((int) a.size())
#define all(a) begin(a), end(a)
#define fi first
#define se second
#define pb(x) push_back(x)
#define mk(x, y) make_pair(x, y)
#define log2i(x) (31-__builtin_clz(x))
#define log2ll(x) (63-__builtin_clzll(x))
#define bsz(x) __builtin_popcount(x)

typedef int64_t ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef vector<int> vi;

const int K = 1e6+5;
const int MAX = 1e3+5;
const int MOD = 1e9+7;
const ll INF = INT_MAX;
const ll _INF = INT_MIN;

ll n, m, k;
ll fac[K], infac[K], total[MAX][MAX];

ll Pow(ll a, ll b) {
	if(b == 0) return 1;
	if(a == 0 || a == 1) return a;

	ll curr = 1;
	while(b > 0) {
		if(b % 2 != 0) curr = (curr*a) % MOD;
		a = (a*a) % MOD;
		b /= 2;
	}

	return curr;
}

void precompute() {
	fac[0] = 1;
	fo(i, 1, k) fac[i] = (fac[i-1]*i) % MOD;
	infac[k] = Pow(fac[k], MOD-2);
	_fo(i, k-1, 0) infac[i] = (infac[i+1]*(i+1)) % MOD;

	total[0][0] = 1;
	fo(len, 1, n) {
		fo(x, 1, k) {
			if(x > len) break;
			total[len][x] = (((total[len-1][x]+total[len-1][x-1]) % MOD) * x) % MOD;
		}
	}
}

ll nCr(ll a, ll b) {
	return (((fac[a]*infac[a-b]) % MOD) * infac[b]) % MOD;
}

ll cal(ll i, ll j) {
	ll mid = (Pow(i, n*(m-2))*nCr(k, i)) % MOD;
	ll lm = (nCr(k-i, j)*total[n][i+j]) % MOD;
	ll rm = (nCr(k-i-j, j)*total[n][i+j]) % MOD;
	return (((lm*rm) % MOD) * mid) % MOD;
}

ll solve() {
	if(m == 1) return Pow(n, k);
	else {
		precompute();
		ll curr = 0;
		int temp = min(n, k);
		fo(i, 0, k) {
			if(i > n) break;
			fo(j, 0, k) {
				if(i+j == 0) continue;
				if(i+j > n) break;
				if(i+j*2 > k) break;
				curr = (curr+cal(i, j)) % MOD;
			}
		}

		return curr;
	}
}

signed main() {
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

	cin >> n >> m >> k;

	cout << solve();
}

#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

#define _int64 long long
#define mo 1000000007

int d[1010][1010];

int pp(int x,int y)
{
	int a[100];
	int i,m;
	_int64 ans;
	if (y==0) return 1;
	m=0;
	while (y>0)
	{
		a[m]=y%2;
		y/=2;
		m++;
	}
	ans=1;
	for (i=m-1;i>=0;i--)
	{
		ans=ans*ans;
		ans%=mo;
		if (a[i]==1)
		{
			ans*=x;
			ans%=mo;
		}
	}
	return ans;
}

pair<_int64,_int64> solve(int x,int y)
{
	if (x==0) return make_pair(0,1);
	pair<_int64,_int64> p=solve(y%x,x);
	return make_pair(p.second-p.first*(y/x),p.first);
}

int inv(int x)
{
	pair<_int64,_int64> p=solve(x,mo);
	p.first%=mo;
	while (p.first<0) p.first+=mo;
	return p.first;
}

_int64 cc[1010];
int c1[2010][2010];
int jie[1010];

int main()
{
	int i,j,m,n,k;
	_int64 tmp,ans,x;
	/*
	for (i=1;i<=1000000;i++)
	{
		j=inv(i);
		x=i;
		x*=j;
		x%=mo;
		if (x!=1)
		{
			x=x;
		}
	}*/
	scanf("%d%d%d",&m,&n,&k);
	if (n==1)
	{
		ans=1;
		for (i=0;i<m;i++)
		{
			ans*=k;
			ans%=mo;
		}
		printf("%d\n",(int)ans);
		return 0;
	}
	memset(d,0,sizeof(d));
	d[0][0]=1;
	for (i=0;i<m;i++)
		for (j=0;j<=i;j++)
		{
			d[i+1][j]=((_int64)d[i][j]*j+d[i+1][j])%mo;
			d[i+1][j+1]+=d[i][j];
			if (d[i+1][j+1]>=mo) d[i+1][j+1]-=mo;
		}
	ans=0;
	cc[0]=1;
	for (i=1;(i<=m)&&(i<=k);i++)
	{
		cc[i]=cc[i-1];
		cc[i]*=(k-i+1);
		cc[i]%=mo;
		cc[i]*=inv(i);
		cc[i]%=mo;
	}
	for (i=0;i<=m+m;i++)
	{
		c1[i][0]=1;
		c1[i][i]=1;
		for (j=1;j<i;j++)
		{
			c1[i][j]=c1[i-1][j]+c1[i-1][j-1];
			if (c1[i][j]>=mo) c1[i][j]-=mo;
		}
	}
	jie[0]=1;
	for (i=1;i<=m;i++)
		jie[i]=(_int64)jie[i-1]*i%mo;

	for (i=1;(i<=m)&&(i<=k);i++)
		for (j=0;j<=i;j++)
		{
			if (i+i-j>k) continue;
			tmp=cc[i+i-j];
			tmp*=c1[i+i-j][i-j];
			tmp%=mo;
			tmp*=c1[i][i-j];
			tmp%=mo;
			tmp*=d[m][i];
			tmp%=mo;
			tmp*=jie[i];
			tmp%=mo;
			tmp*=d[m][i];
			tmp%=mo;
			tmp*=jie[i];
			tmp%=mo;
			tmp*=pp(j,(n-2)*m);
			tmp%=mo;
			ans+=tmp;
			ans%=mo;
		}
	printf("%d\n",(int)ans);
	return 0;
}

#include <cstdio>

const int p=1000000007;
int fac[1200000],inv[1200000];
int f[1200];
int i,j,k,m,n,s;

inline int power(int x,int y)
{
	if (y==0)
		return 1;
	int t=power(x,y/2);
	t=1LL*t*t%p;
	if (y&1)
		t=1LL*t*x%p;
	return t;
}

inline void pre_C()
{
	fac[0]=1;
	for (int i=1;i<=k;i++)
		fac[i]=1LL*fac[i-1]*i%p;
	inv[k]=power(fac[k],p-2);
	for (int i=k-1;i>=0;i--)
		inv[i]=1LL*inv[i+1]*(i+1)%p;
	return;
}

inline int C(int x,int y)
{
	return 1LL*fac[x]*inv[y]%p*inv[x-y]%p;
}

int main()
{
	scanf("%d%d%d",&n,&m,&k);
	pre_C();
	for (i=1;i<=n;i++)
	{
		f[i]=power(i,n);
		for (j=1;j<i;j++)
			f[i]=(f[i]+p-1LL*C(i,j)*f[j]%p)%p;
	}
	if (m==1)
		printf("%d",power(k,n));
	if (m==2)
	{
		for (i=1;i<=n;i++)
			s=(s+1LL*C(k,i)*C(k,i)%p*f[i]%p*f[i]%p)%p;
		printf("%d",s);
	}
	if (m>2)
	{
		for (i=1;i<=n;i++)
			for (j=0;(i+2*j<=n) && (i+2*j<=k);j++)
				s=(s+1LL*C(k,i)*C(k-i,j)%p*C(k-i-j,j)%p*f[i+j]%p*f[i+j]%p*power(power(i,n),m-2)%p)%p;
		printf("%d",s);
	}
	return 0;
}

#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cstring>
#include <cassert>
#include <utility>
#include <iomanip>

using namespace std;

const int mod = 1000 * 1000 * 1000 + 7;
const int MAXN = 1050;

int binpow(int x, int p) {
    int res = 1;
    while (p) {
        if (p & 1) {
            res = (1ll * res * x) % mod;
            p--;
        }
        else {
            x = (1ll * x * x) % mod;
            p /= 2;
        }
    }
    return res % mod;
}

int n, m, col;
int c[MAXN][MAXN];
int dp[MAXN][MAXN];
int cc[MAXN];

int main() {
    scanf("%d %d %d", &n, &m, &col);

    for (int i = 0; i < MAXN; i++)
        c[i][0] = 1;
    for (int i = 1; i < MAXN; i++)
        for (int j = 1; j < MAXN; j++)
            c[i][j] = (c[i - 1][j] + c[i - 1][j - 1]) % mod;

    cc[0] = 1; cc[1] = col; cc[col] = 1;
    for (int i = 2; i < min(MAXN, col); i++) {
        cc[i] = (1ll * cc[i - 1] * (col - i + 1)) % mod;
        cc[i] = (1ll * cc[i] * binpow(i, mod - 2)) % mod;
    }

    dp[0][0] = 1;
    for (int i = 1; i <= n; i++)
        for (int j = 1; j <= n; j++)
            dp[i][j] = (1ll * dp[i - 1][j] * j + 1ll * dp[i - 1][j - 1] * j) % mod;

    if (m == 1) {
        long long ans = binpow(col, n) % mod;
        cout << ans << endl;
        return 0;
    }

    if (m == 2) {
        long long ans = 0;
        for (int i = 1; i <= min(n, col); i++) {
            long long cur = (1ll * dp[n][i] * cc[i]) % mod;
            cur = (cur * cur) % mod;
            ans = (ans + cur) % mod;
        }
        cout << ans << endl;
        return 0;
    }

    long long ans = 0;
    for (int i = 1; i <= min(n, col); i++) {
        long long cur = cc[i];
        cur = (1ll * cur * dp[n][i]) % mod;
        cur = (1ll * cur * dp[n][i]) % mod;
        cur = (cur * binpow(i, (n - 2) * m)) % mod;
        ans = (ans + cur) % mod;
    }

    cout << ans << endl;

    return 0;
}

#include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <algorithm>

#define MOD 1000000007

using namespace std;

long long P[1010];
long long PP[1010];
long long NCR[2010];
long long NCR2[2010][2010];

long long mexp(long long x, long long p) {
  long long ret = 1;
  for(int i = 63 - __builtin_clzll(p); i >= 0; i--) {
    ret = (ret * ret) % MOD;
    if(p & 1ll << i) ret = (ret * x) % MOD;
  }
  return ret;
}

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

  P[0] = 0;
  for(int i = 1; i < 1010; i++) {
    P[i] = 1;
    for(int j = 0; j < N; j++) {
      P[i] = (P[i] * i) % MOD;
    }
  }
  for(int i = 0; i < 1010; i++) {
    PP[i] = 1;
    for(int j = 2; j < M; j++) {
      PP[i] = (PP[i] * P[i]) % MOD;
    }
  }
  for(int i = NCR2[0][0] = 1; i < 2010; i++) {
    for(int j = NCR2[i][0] = NCR2[i][i] = 1; j < 2010; j++) {
      NCR2[i][j] = (NCR2[i - 1][j - 1] + NCR2[i - 1][j]) % MOD;
    }
  }

  for(int i = NCR[0] = 1; i <= K && i < 2010; i++) {
    NCR[i] = (NCR[i - 1] * (K - i + 1)) % MOD;
    NCR[i] = (NCR[i] * mexp(i, MOD - 2)) % MOD;
  }

  if(M == 1) {
    long long res = 1;
    for(int i = 0; i < N; i++) res = (res * K) % MOD;
    cout << res << endl;
    return 0;
  }

  long long res = 0;
  for(int i = 1; i <= K && i <= N; i++) {
    for(int olp = 0; olp <= i; olp++) {
      if(2 * i - olp > K) continue;

      long long num = ((P[i] - P[i - 1] * i) % MOD + MOD) % MOD;
      num = (num * num) % MOD;
      num = (num * PP[olp]) % MOD;
      num = (num * NCR[2 * i - olp]) % MOD;
      num = (num * NCR2[2 * i - olp][i]) % MOD;
      num = (num * NCR2[i][olp]) % MOD;

      res = (res + num) % MOD;
    }
  }

  cout << res << endl;
}

		//			- -- --- ---- -----be name khoda----- ---- --- -- -			\\

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const int N = 1221, MOD = 1e9 + 7;

ll n, m, k, t[N], c[N][N];

ll pw(int p, int t)
{
	if(!t)
		return 1;
	ll res = pw(p, t / 2);
	res = res * res % MOD;
	if(t % 2)
		res *= p;
	return res % MOD;
}

void fil()
{
	for(int i = 0; i < N; i++)
		c[i][i] = c[0][i] = 1;
	for(int i = 1; i < N; i++)
		for(int j = i + 1; j < N; j++)
			c[i][j] = (c[i - 1][j - 1] + c[i][j - 1]) % MOD;

	t[0] = 0;
	for(int c = 1; c < N; c++)
		t[c] = ((pw(c, m) - t[c - 1] * c) % MOD + MOD)% MOD;
}

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> n >> m >> k;
	swap(n, m);
	fil();
	if(n < 3)
	{
		ll ans = 0;
		for(int i = 0; i <= min(m, k); i++)
		{
			ll cr = t[i] * c[i][k] % MOD;
			if(n == 1)
				ans += cr;
			else
				ans += cr * cr % MOD;
		}
		cout << ans << endl;
		return 0;
	}
	ll ans = 0;
	for(int i = 1; i <= min(m, k); i++)
		ans += pw(t[i], n) * c[i][k] % MOD;
	cout << ans << endl;
}

#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <sstream>
#include <iostream>
using namespace std;
typedef long long ll;

#define REP(i,n) for (ll i=0; i<(ll)(n); ++i)
#define FOR(i,k,n) for (ll i=(k); i<(ll)(n); ++i)
#define FOREQ(i,k,n) for (ll i=(k); i<=(ll)(n); ++i)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

#define SZ(v) (ll)((v).size())
#define MEMSET(v,h) memset((v),(h),sizeof(v))

const int MOD = 1000000007LL;
ll mul(ll a, ll b) { return (a*b)%MOD; }

int sub[1020][1020];
ll dp[1020];

ll inv_sub(ll a, ll p) {
    return ( a == 1 ? 1 : (1 - p*inv_sub(p%a, a)) / a + p );
}
ll inv(ll a) { return inv_sub(a, MOD); }

// power
ll power(ll a,ll b) {
    if (b==0) return 1LL;
    if (b%2) return (a*power(a,b-1))%MOD;
    else {
        ll x=power(a,b/2);
        return (x*x)%MOD;
    }
}

ll fact[1000020];
ll fimemoA[3020];
ll fimemoB[3020];
int combin[1020][1020];

int main() {
    combin[0][0] = 1;
    FOREQ(i, 1, 1000) {
        combin[0][i] = combin[i][i] = 1;
        FOREQ(j, 1, i-1)
            combin[j][i] = (combin[j-1][i-1] + combin[j][i-1])%MOD;
    }
    fact[0] = 1;
    FOREQ(i, 1, 1000020) fact[i] = (fact[i-1] * i) % MOD;

    ll N, M, K;
    while (cin>>N>>M>>K) {
        // perhaps edge case
        if (M == 1) {
            // calc K^M
            ll res = 1LL;
            REP(i, M) res = (res * K) % MOD;
            cout << res << endl;
            continue;
        }

        // normal
        // preparation

        MEMSET(sub, 0);
        sub[0][N] = 1;
        FOREQ(i, 1, N) FOREQ(n, 0, N - i) {
            // sub[i][n] = \Sum_{k > n} Combin(k, n) * sub[i-1][k]
            int r=0;
            FOREQ(k, n+1, N-i+1) r = (r + ((ll)combin[n][k]*sub[i-1][k])%MOD ) % MOD;
            sub[i][n] = r;
        }
        FOREQ(i, 0, N) dp[i] = sub[i][0];

        FOREQ(i, 0, 3000) fimemoA[i] = inv(fact[i]);
        FOREQ(i, 0, 3000) {
            if (K-i < 0) break;
            fimemoB[i] = inv(fact[K-i]);
        }

        // s: common color, t: non-common color
        ll res = 0;
        FOREQ(s, 0, N) {
            ll memo = mul(mul(fact[K], fimemoA[s]), power(s, N*(M-2)));
            FOREQ(t, 0, N) {
                if (s+t == 0 || s+t > N) continue;
                if (s+2*t > K) continue;
                // K! / (s!*t!*t!*(K-s-2*t)) * s^(N*(M-2)) * dp[s+t] * dp[s+t]
                ll f = memo;
                f = mul(f, fimemoA[t]);
                f = mul(f, fimemoA[t]);
                f = mul(f, fimemoB[s+2*t]);
                res += mul(f, mul(dp[s+t], dp[s+t]));
            }
        }

        cout << res%MOD <<endl;
    }
}

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/detail/standard_policies.hpp>
using namespace std;
using namespace __gnu_pbds;
// const ll RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count();
// gp_hash_table<int, int> table;

#define ll long long int
#define vii vector< ll >
#define pb push_back
#define pii pair<ll,ll>
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define ins insert
#define ld long double
#define lp(l,r) for(i=l;i<=r;++i)

#define lpj(l,r) for(j=l;j<=r;++j)
#define lpr(l,r) for(i=r;i>=l;--i)
#define lprj(l,r) for(j=r;j>=l;--j)

#define swap(a,b){ auto _t=a;a=b,b=_t;}
#define flush() cout.flush()
#define popcount __builtin_popcount
#define die() return 0;

// typedef __int128 bign;

#define TRACE

#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cerr.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
#else
#define trace(...)
#endif

#define MD          1000000007
#define M            100011
#define LN             14
#define fftmod      998244353
#define EPS         (double)1e-10

ll md=MD;
ll inf=1e18;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

inline ll exp(ll a,ll b){if(a==0)return 0ll;ll r=1LL;while(b>0){if(b&1){r=(r%md)*(a%md);r=(r+md)%md;}b/=2;a=(a%md)*(a%md);a=(a+md)%md;}return (r+md)%md;}
ll gcd(ll a,ll b){if(b==0)return a;if(a==0)return b;return gcd(b,a%b);}
inline ll poww(ll a,ll b){ll r=1LL;while(b>0){if(b&1)r=r*a;b/=2;a=a*a;}return (ll)r;}

using cd=complex<double>;
const double PI=acos(-1);

inline ll rand(ll l,ll r){
    return l+rng()%(r-l+1);

}

ll fa[M],iv[M];
ll chose(ll n,ll k){
	if(k>n)return 0;
	ll r=fa[n];r=r*iv[k]%md;r%=md;r*=iv[n-k]%md;return r%md;
}
ll dp[1011][1011];
ll f(ll m,ll k){
	ll i,r=0;
	if(dp[m][k]!=-1)return dp[m][k];
	r=exp(k,m);
	for(i=1;i<k;++i){
		// trace()
		ll k1=chose(k,i);
		k1=k1*f(m,i)%md;k1%=md;
		r=r-k1%md;r=(r+md)%md;

	}
	dp[m][k]=r;
	return r;
}
int main(){

    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);

   // ifstream fin("input.txt");ofstream fout("outut.txt");
    ll t,i,j,m,n,s,z,k,p;string s1,s2;ll q;ll x,y;ll h;
    fa[0]=iv[0]=1;
    lp(1,M-1){
    	fa[i]=fa[i-1]*i%md;fa[i]%=md;
    	iv[i]=iv[i-1]*exp(i,md-2)%md;iv[i]%=md;
    }
    memset(dp,-1,sizeof(dp));
    cin>>n>>m>>k;
    if(m==1){
    	p=exp(k,n*m)%md;cout<<p<<"\n";die();
    }
    if(m==2){
    	ll ans=0;
    	for(i=1;i<=min(n,k);++i){
    	p=f(n,i)%md;
    	p=p*p%md;p%=md;
    	y=chose(k,i);
    	y=y*y%md;y%=md;

    	ans=ans+y*p%md;ans%=md;

    	}cout<<ans<<"\n";die();

    }
    ll ans=0;
    for(i=1;i<=min(n,k);++i){
    	x=exp(i,n*(m-2))%md;
    	// trace(i,x,p)
    	p=f(n,i)%md;
    	p=p*p%md;p%=md;
    	p=p*x%md;p%=md;
    	trace(i,p,x);
    	ans=ans+chose(k,i)*p%md;ans%=md;
    }
    cout<<ans<<"\n";

 }

/* Writen by Filip Hlasek 2011 */
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <string>
#include <algorithm>
#include <cmath>
#include <iostream>

#define FOR(i,n) for(i=0;i<n;i++)
#define MOD 1000000007

using namespace std;

int N,M,K;
long long dp[2222], fact[222222], ifact[222222];

long long p(int b,int po){
  long long res=1,m=b;
  int i;
  for(i=0;(1<<i)<=po;i++){
    if(po&(1<<i)) res=(res*m)%MOD;
    m=(m*m)%MOD;
  }
  return res;
}

long long c(int a,int b){
  return (((fact[a]*ifact[b])%MOD)*ifact[a-b])%MOD;
}

long long a(int n){
  if(n==1) return 1;
  if(dp[n]!=-1) return dp[n];
  int i;
  dp[n]=p(n,N);
  for(i=1;i<n;i++) dp[n]=(dp[n]-(a(i)*c(n,i))%MOD+MOD)%MOD;
  return dp[n];
}

int main(int argc, char *argv[]){
  scanf("%d%d%d",&N,&M,&K);
  int i;
  FOR(i,N+1) dp[i]=-1;
  fact[0]=1;
  FOR(i,222222){
    fact[i+1]=(fact[i]*(i+1))%MOD;
    ifact[i]=p(fact[i],MOD-2);
  }
  int barev,shoduje;
  long long sum=0,cur;
  if(M==1){
    for(barev=1;barev<=min(N,K);barev++) sum=(sum+a(barev))%MOD;
    cout << sum << endl;
    return 0;
  }
  for(barev=1;barev<=min(N,K);barev++) for(shoduje=0;shoduje<=barev;shoduje++) if((shoduje>0||M==2)&&2*barev-shoduje<=K){
    cur=(c(K,shoduje)*c(K-shoduje,barev-shoduje))%MOD;
    cur=(cur*c(K-barev,barev-shoduje))%MOD;
    cur=(cur*a(barev))%MOD;
    cur=(cur*a(barev))%MOD;
    cur=(cur*p(shoduje,N*(M-2)))%MOD;
    sum=(sum+cur)%MOD;
//    printf("barva:%d shoduje:%d cur:%lld sum:%lld\n",barev,shoduje,cur,sum);
  }
  cout << sum << endl;
  return 0;
}

#include <iostream>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
int n,m,k;
int dp[1234][1234];
int fa[1234567],df[1234567];
inline int pw (int base , int p){
    if (p==0) return 1;
    ll now = pw(base,p/2);
    return (p%2==1) ? (((now*now)%mod)*(ll)base)%mod : (now*now)%mod;
}
inline void init (){
    int maxi = max(max(n,m),k);
    fa[0]=1;
    for (int i=1; i<=maxi; i++)
        fa[i] = ((ll)fa[i-1]*i)%mod;

    for (int i=0; i<=maxi; i++)
        df[i] = pw(fa[i],mod-2);
}
inline int calcC (int x , int y){
    return ((((ll)fa[x] * df[y])%mod) * (ll)df[x-y])%mod;
}
int main(){
    cin >> n >> m >> k; swap(n,m);
    init ();
    dp[0][0] = 1;
    for (int i=1; i<=m; i++)
        for (int j=1; j<=m; j++)
            dp[i][j] = ((ll)j * (dp[i-1][j] + dp[i-1][j-1]))%mod;
    if (n==1){
        cout << pw(k,m) << endl;
        return 0;
    }
    cout << dp[2][1] << ' ' << dp[2][2] << endl;
    ll res = 0;
    for (int i=0; i<=m; i++)
        for (int j=0; j<=m; j++) if (i+2*j<=k && i+j<=m){

            if (i==0 && n!=2 && j==0)
                continue;

            ll cont = (ll)calcC(k,i) * ((calcC(k-i,j) * (ll)calcC(k-i-j,j))%mod); cont%=mod;

            cont*= pw(i,m*(n-2)); cont%=mod;

            cont*= (((ll)dp[m][i+j] * dp[m][i+j])%mod); cont%=mod;

            res+= cont; res%=mod;
        }
    cout << res << endl;
    return 0;
}

#include <iostream>
#include <vector>
#include <cstdlib>

using namespace std;

typedef long long int lint;

lint modulo=1000000007;

lint eleva(lint x,lint e)
{
  if (e==0) return 1;
  if (e%2==0) return eleva((x*x)%modulo,e/2);
  return (x*eleva((x*x)%modulo,e/2))%modulo;
}

lint inverso(lint x)
{
  return eleva(x,modulo-2);
}

lint combi(lint n,lint k)
{
  lint r=1;
  for (int i=0;i<k;i++) {
    r=(r*(n-i))%modulo;
    r=(r*inverso(k-i))%modulo;
  }
  return r;
}

vector<vector<lint> > memoria(2001,vector<lint> (2001,-1));

lint combinatori(lint n,lint k)
{
  if (k==0 or k==n) return 1;
  lint &m=memoria[n][k];
  if (m!=-1) return m;
  m=(combinatori(n-1,k-1)+combinatori(n-1,k))%modulo;
  return m;
}

vector<vector<lint> > memoriaaux(2001,vector<lint> (2001,-1));

lint coloca(lint n,lint k)
{
  if (n==0) {
    if (k==0) return 1;
    return 0;
  }
  if (k==0) return 0;
  lint &m=memoriaaux[n][k];
  if (m!=-1) return m;
  m=(k*coloca(n-1,k-1)+k*coloca(n-1,k))%modulo;
  return m;
}

int main()
{
  lint n,m,k;
  cin>>n>>m>>k;
  if (m==1) {
    cout<<eleva(k,n)<<endl;
    exit(0);
  }
  lint opciones=0;
  for (lint kp=1;kp<=2*n and kp<=k;kp++) {
    lint eleccionkp=combi(k,kp);
    for (lint kcomun=0;kcomun<=kp and kcomun<=n;kcomun++) {
      lint kdif=(kp-kcomun)/2;
      if (kcomun+kdif+kdif!=kp or kdif+kcomun>n) continue;
      lint elec=(eleccionkp*combinatori(kp,kcomun))%modulo;
      elec=(elec*combinatori(kp-kcomun,kdif))%modulo;
      elec=(elec*coloca(n,kcomun+kdif))%modulo;
      elec=(elec*coloca(n,kcomun+kdif))%modulo;
      elec=(elec*eleva(kcomun,(m-2)*n))%modulo;
      opciones+=elec;
    }
  }
  cout<<opciones<<endl;
}

/*
ID: keyvank2
TASK: combo
LANG: C++
*/

#include <bits/stdc++.h>

#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define MAXINT ((~0) ^ (1 << 31))
#define MAXLL ((~0) ^ ((ll)1 << 63))
#define INF ((int)2e9)
#define INFL ((ll)9e18)
#define FOR(i,j,k) for(int i = j; i < k; i++)
#define REP(i,j,k) for(int i = j; i >= k; i--)
#define setmax(i) const int maxn = (int) i;
#define setmod(i) const int MOD = (int) i;
#define all(a) a.begin(),a.end()

using namespace std;

//ifstream fin("");
//ofstream fout("");
//#define cin fin
//#define cout fout

typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<ld,ld> pdd;
typedef pair<pii,int> ppi;
typedef pair<pll,ll> ppl;
typedef pair<int,pii> pip;
typedef pair<ll,pll> plp;
typedef pair<pii,pii> ppp;

template<class T> inline T pow2(T a) {return a*a;}

//srand (time(NULL));

setmax(1e6+10);
setmod(1e9+7);
ll n,m,k;
ll fact[maxn],rfact[maxn],pon[maxn],dp[2222];

ll po(ll a, ll b)
{
    if(!b) return 1;
    ll t = po(a,b/2);
    t = (t*t)%MOD;
    if(b & 1) t = (t*a) % MOD;
    return t;
}

ll cmb(ll m, ll x)
{
    if(x > m) return 0;
    if(x == m || !x) return 1;
    ll ans = (fact[m]*rfact[x])%MOD;
    ans = (ans*rfact[m-x])%MOD;
    return ans;
}

void pre()
{
    fact[0] = 1;
    FOR(i,1,maxn) fact[i] = (i*fact[i-1]) % MOD;
    FOR(i,0,maxn) rfact[i] = po(fact[i],MOD-2);
    FOR(i,0,maxn) pon[i] = po(i,n);

    ll prev = 0;
    FOR(i,1,2222)
    {
	ll id = 1;
	REP(j,i,0)
	{
	    dp[i] += id*cmb(i,j)*pon[j];
	    id *= -1;
	}
    }
}

int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);

    cin >> n >> m >> k;
    pre();

    if(m == 1)
    {
	cout << po(k,n);
	return 0;
    }

    ll ans = 0;
    FOR(i,1,n+1)
    {
	FOR(j,0,i+1)
	{
	    ll cur = 1;
	    ll p = dp[i];

	    cur = (cur * cmb(k,i)) % MOD;
	    cur = (cur * cmb(i,j)) % MOD;
	    cur = (cur * cmb(k-i,i-j)) % MOD;
	    cur = (cur * p) % MOD;
	    cur = (cur * p) % MOD;
	    cur = (cur * po(j,n*(m-2))) % MOD;
	    ans += cur;
	    ans %= MOD;
	   // cout << i << " " << j <<  " " << cur << endl;
	}
    }

    cout << ans << endl;

}

#include <bits/stdc++.h>

using namespace std;

#define LL long long
#define int long long
#define fi first
#define se second
#define pll pair<LL, LL>
#define pii pair<LL, LL>
#define fastio ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);

constexpr int N = 1e3+5;
constexpr int M = 1e9+7;

// #define DEBUG 1  //调试开关
struct IO {
#define MAXSIZE (1 << 20)
#define isdigit(x) (x >= '0' && x <= '9')
    char buf[MAXSIZE], *p1, *p2;
    char pbuf[MAXSIZE], *pp;

    IO() : p1(buf), p2(buf), pp(pbuf) {}
    ~IO() { fwrite(pbuf, 1, pp - pbuf, stdout); }

    inline char gc() {
        if (p1 == p2) p2 = (p1 = buf) + fread(buf, 1, MAXSIZE, stdin);
        return p1 == p2 ? ' ' : *p1++;
    }
    inline bool blank(char ch) {
        return ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t';
    }
    template <class T>
    inline void read(T &x) {
    double tmp = 1;
    bool sign = 0;
    x = 0;
    char ch = gc();
    for (; !isdigit(ch); ch = gc())
        if (ch == '-') sign = 1;
    for (; isdigit(ch); ch = gc()) x = x * 10 + (ch - '0');
    if (ch == '.')
        for (ch = gc(); isdigit(ch); ch = gc())
        tmp /= 10.0, x += tmp * (ch - '0');
    if (sign) x = -x;
    }
    inline void read(char *s) {
    char ch = gc();
    for (; blank(ch); ch = gc())
        ;
    for (; !blank(ch); ch = gc()) *s++ = ch;
    *s = 0;
    }
    inline void read(char &c) {
    for (c = gc(); blank(c); c = gc())
        ;
    }
    inline void push(const char &c) {
    #if DEBUG  //调试，可显示字符
    putchar(c);
    #else
    if (pp - pbuf == MAXSIZE) fwrite(pbuf, 1, MAXSIZE, stdout), pp = pbuf;
    *pp++ = c;
    #endif
    }
    template <class T>
    inline void write(T x) {
    if (x < 0) x = -x, push('-');  // 负数输出
    static T sta[35];
    T top = 0;
    do {
        sta[top++] = x % 10, x /= 10;
    } while (x);
    while (top) push(sta[--top] + '0');
    }
    template <class T>
    inline void write(T x, char lastChar) {
    write(x), push(lastChar);
    }
} io;

int n, m, k;
int fact[N];

int kpow(int a, int b) {
    int c = 1;
    while (b) {
        if (b & 1) c = c * a % M;
        a = a * a % M;
        b >>= 1;
    }
    return c;
}

void init() {
    fact[0] = 1;
    for (int i = 1; i < N; i++) {
        fact[i] = fact[i-1] * i % M;
    }
}

inline int inv(int x) {
    return kpow(x, M-2);
}

inline int C(int n, int m) {
    return fact[n] * inv(fact[n-m] * fact[m] % M) % M;
}

int dp[N][N];
int ans;

signed main() {
    fastio;
    init();
    io.read(n), io.read(m), io.read(k);
    if (m == 1) {
        io.write(min(n, k) % M, '\n');
        return 0;
    }
    dp[0][0] = 1;
    for (int i = 1; i <= n; i++) {
        for (int j = 1; j <= n; j++) {
            dp[i][j] = (j * dp[i-1][j] % M + dp[i-1][j-1]) % M;
        }
    }
    //io.write(dp[2][2], '\n');
    if (m == 2) {
        for (int j = 1; j <= k && j <= n; j++) {
            ans += C(k, j) * C(k, j) % M * (dp[n][j] * fact[j] % M * dp[n][j] % M * fact[j] % M) % M;
            ans %= M;
        }
        io.write(ans, '\n');
        return 0;
    }
    for (int j = 1; j <= k && j <= n; j++) {
        for (int i = 1; i <= j; i++) {
            int side = dp[n][j] % M * fact[j] % M;
            ans += C(k, i) * C(k-i, (j-i)*2) % M * C((j-i)*2, j-i) % M  * (side * side % M * kpow(i, n * (m-2)) % M) % M;
            ans %= M;
        }
    }
    io.write(ans, '\n');
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
typedef long long lld;
#define mod 1000000007
lld multandmod(lld a,lld b)
{
    a=a%mod;
    lld res=0;
    while(b)
    {
        if(b&1)
        {
            res=res+a;
            if(res>=mod)
                res=res-mod;
        }
        a=a<<1;
        if(a>=mod)
            a=a-mod;
        b=b>>1;
    }
    return res;
}
lld modandexp(lld a,lld b)
{
    a=a%mod;
    lld res=1;
    while(b>=1)
    {
        if(b&1)
            res=multandmod(res,a);
        a=multandmod(a,a);
        b=b>>1;
    }
    return res;
}
lld c[2010][2010];
lld ck[2010];
lld fac[1010];
lld dp[1010][1010];
lld k;
lld inv(lld x)
{
    if(x == 1)
        return 1;
    return  inv(mod%x)*(mod-mod/x)%mod;
}
void init()
{
    memset(c,0,sizeof(c));
    c[1][0]=c[1][1]=1;
    for(int i=2;i<=2000;i++)
    {
        c[i][0]=1;
        for(int j=1;j<=i;j++)
            c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod;
    }
    memset(ck,0,sizeof(ck));
    ck[0]=1;
    ck[1]=k;
    for(int i=2;i<=k;i++)
    {
        ck[i]=ck[i-1]*(k-i+1);
        ck[i]%=mod;
        ck[i]*=inv(i);
        ck[i]%=mod;
    }
    fac[0]=1;
    fac[1]=1;
    for(int i=2;i<=1000;i++)
        fac[i]=(fac[i-1]*i)%mod;
    memset(dp,0,sizeof(dp));
    dp[1][0]=0;
    dp[1][1]=1;
    for(int i=2;i<=1000;i++)
        for(int j=1;j<=i;j++)
            dp[i][j]=(dp[i-1][j]*j+dp[i-1][j-1])%mod;
}
int main()
{
    int n,m;
    cin >> n >> m >> k;
    init();
    lld ans=0;
    if(m == 1)
        ans=modandexp(k,n);
    else if(m == 2)
    {
        for(int i=1;i<=n && i<=k;i++)
        {
            lld temp=1;
            temp=(temp*ck[i])%mod;
            temp=(temp*dp[n][i])%mod;
            temp=(temp*fac[i])%mod;
            temp=(temp*ck[i])%mod;
            temp=(temp*dp[n][i])%mod;
            temp=(temp*fac[i])%mod;
            ans=(ans+temp)%mod;
        }
    }
    else
    {
        for(int y=0;y<=n;y++)
        {
            lld f1=modandexp(y,n*(m-2));
            for(int x=y;x<=n;x++)
                if(2*x-y <= k)
                {
                    lld tmp=f1;
                    tmp=(tmp*ck[2*x-y])%mod;
                    tmp=(tmp*c[2*x-y][x-y])%mod;
                    tmp=(tmp*c[x][x-y])%mod;
                    tmp=(tmp*dp[n][x])%mod;
                    tmp=(tmp*fac[x])%mod;
                    tmp=(tmp*dp[n][x])%mod;
                    tmp=(tmp*fac[x])%mod;
                    ans=(ans+tmp)%mod;
                }
        }
    }
    cout << ans << endl;
    return 0;
}

#include <algorithm>
#include <iostream>
#define MOD 1000000007

using namespace std;

inline long long fastpow(int a, int b) {
    long long r = 1, p = a;
    while (b) {
        if (b & 1)
            r = (r * p) % MOD;

        p = (p * p) % MOD;
        b >>= 1;
    }
    return r;
}

inline long long inv(int a) {
    return fastpow(a, MOD - 2);
}

long long f(int n, int k) {
    long long total = fastpow(k, n);
    long long over = (fastpow(k - 1, n) * k) % MOD;
    total = (total - over + MOD) % MOD;
    return total;
}

long long fact[1001];

void init() {
    fact[0] = 1;
    for (int i = 1; i <= 1000; i++)
        fact[i] = (i * fact[i - 1]) % MOD;
}

int main() {
    int n, m, k;
    cin >> n >> m >> k;

    init();

    if (m == 1) {
        cout << fastpow(k, n) << endl;
        return 0;
    }

    long long sum = 0;
    for (int total = 0; total <= min(k, n); total++) {
        for (int overlap = 0; overlap <= total; overlap++) {
            int sep = total - overlap;
            if (overlap + 2 * sep > k)
                continue;

            // choose colors
            long long cur = fact[k];
            cur = (cur * inv(fact[sep])) % MOD;
            cur = (cur * inv(fact[sep])) % MOD;
            cur = (cur * inv(fact[overlap])) % MOD;
            cur = (cur * inv(fact[k - overlap - 2 * sep])) % MOD;

            // choose sides
            int l = total;
            long long x = f(n, l);
            cur = (cur * x) % MOD;
            cur = (cur * x) % MOD;

            // choose rest
            cur = (cur * fastpow(overlap, n * (m - 2))) % MOD;

            sum = (sum + cur) % MOD;
        }
    }

    cout << sum << endl;
}

#include <bits/stdc++.h>
using namespace std;
#define N 1000010
#define mod 1000000007
int dp[N],inv[N],fac[N];
inline int C(int m,int n) {
    return 1LL*fac[n]*inv[m]%mod*inv[n-m]%mod;
}
inline int read() {
    int x=0;
    char ch=getchar();
    while (!isdigit(ch)) ch=getchar();
    while (isdigit(ch)) x=x*10+ch-'0',ch=getchar();
    return x;
}
inline int Pow(int x,int y) {
    int res=1;
    while (y) {
        if (y&1) res=1LL*res*x%mod;
        x=1LL*x*x%mod,y>>=1;
    }
    return res;
}
int main() {
    int n=read(),m=read(),k=read();
    fac[0]=inv[0]=inv[1]=1;
    for (int i=1;i<N;i++) fac[i]=1LL*fac[i-1]*i%mod;
    for (int i=2;i<N;i++) inv[i]=1LL*(mod-mod/i)*inv[mod%i]%mod;
    for (int i=1;i<N;i++) inv[i]=1LL*inv[i-1]*inv[i]%mod;
    // puts("qwq");
    // cout<<C(2,4)<<endl;
    for (int i=1;i<=n;i++) {
        dp[i]=Pow(i,n);
        for (int j=1;j<=i-1;j++) {
            (dp[i]-=1LL*C(j,i)*dp[j]%mod)%=mod;
            if (dp[i]<0) dp[i]+=mod;
        }
    }
    int ans=0;
    if (m==1) {
        return printf("%d\n",Pow(k,n)),0;
    }
    if (m==2) {
        // puts("qwq");
        for (int i=1;i<=n && i<=k;i++) {
            (ans+=1LL*dp[i]*dp[i]%mod*C(i,k)%mod*C(i,k)%mod)%=mod;
        }
        return printf("%d\n",ans),0;
    }
    // for (int i=1;i<=n;i++) printf("%d ",dp[i]);puts("");
    for (int i=0;i<=n && i<=k;i++) {
        int P=Pow(i,n*m-2*m);
        for (int j=0;j<=n && j<=k;j++) {
            if (i+j>n || i+2*j>k) continue;
            // printf("%d %d %d\n",i,j,P);
            (ans+=1LL*C(i,k)*C(j,k-i)%mod*C(j,k-i-j)%mod*P%mod*dp[i+j]%mod*dp[i+j]%mod)%=mod;
        }
    }
    cout<<ans<<endl;
    return 0;
}

#include<cstdio>
const long long M=1000000007LL;
long long to[1010];
long long mod(long long a,long long b,long long m)
{
    long long ans=1;
    while(b)
    {
        if(b&1)
        ans=ans*a%m;
        a=a*a%m;
        b>>=1;
    }
    return ans;
}
long long c(long long a,long long b)
{
    long long ans=1;
    for(int i=0;i<b;i++)
    {
        ans=ans*(a-i)%M;
        ans=ans*mod(b-i,M-2,M)%M;
    }
    return ans;
}
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if(m==1)
    {
        long long ans=mod(k,n,M);
        printf("%I64d\n",ans);
        return 0;
    }
    if(m==2)
    {
            int max;
    if(n>k)
    max=k;
    else
    max=n;
    long long ans=0;
    for(int i=1;i<=max;i++)
    {
        long long temp=mod(i,n,M);
        for(int j=i-1;j>=1;j--)
        temp=(temp-c(i,j)*to[j])%M;
        to[i]=temp;

        temp=temp*c(k,i)%M;        temp=mod(temp,m,M);
        ans=(ans+temp)%M;
    }
    printf("%I64d\n",ans);
        return 0;
    }
    int max;
    if(n>k)
    max=k;
    else
    max=n;
    long long ans=0;
    for(int i=1;i<=max;i++)
    {
        long long temp=mod(i,n,M);
        for(int j=i-1;j>=1;j--)
        temp=(temp-c(i,j)*to[j])%M;
        to[i]=temp;
        temp=mod(temp,m,M);
        temp=temp*c(k,i)%M;
        ans=(ans+temp)%M;
    }
    printf("%I64d\n",ans);
}

#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
#define MOD 1000000007
long long ans,f[1000005],h[1000005],g[1000005],t;
int n,m,k;
long long pow1(long long a,long long b)
{
	long long t=1;
	while (b)
	{
		if (b&1) t=t*a%MOD;
		a=a*a%MOD;
		b=b>>1;
	}
	return t;
}
long long C(int a,int b)
{
	return h[a]*g[b]%MOD*h[a-b]%MOD;
}
int main()
{
//	freopen("t.txt","r",stdin);
	scanf("%d%d%d",&n,&m,&k);
	if (m==1)
	{
		printf("%I64d",pow1(k,n));
		return 0;
	}
	for (int i=0;i<=1000000;i++)
	h[i]=g[i]=1;
	for (int i=1;i<=1000000;i++)
	h[i]=h[i-1]*i%MOD,g[i]=pow1(h[i],MOD-2);
    for (int i=1;i<=min(n,k);i++)
    {
    	f[i]=pow1(i,n);
    	for (int j=1;j<i;j++)
    	f[i]=(f[i]-C(i,j)*f[j]%MOD+MOD)%MOD;
    }
	if (m==2)
	{
		for (int i=1;i<=min(n,k);i++)
		{
			t=f[i]*f[i]%MOD;
			t=t*C(k,i)%MOD*C(k,i)%MOD;
			ans=(ans+t)%MOD;
		}
	}
	else
	{
		for (int i=1;i<=min(n,k);i++)
		for (int j=0;j<=min(n,k);j++)
		{
			if (k<2*j+i||i+j>n)
			{
				t=f[i+j]*f[i+j]%MOD;
				t=t*C(k,i)%MOD*C(k-i,j)%MOD*C(k-i-j,j)%MOD;
				t=t*pow1(i,n*(m-2))%MOD;
				ans=(ans+t)%MOD;
			}
		}
	}
	printf("%I64d",ans);
}

#include<bits/stdc++.h>
using namespace std;
char ch; bool ok;
void read(int &x){
	for (ok=0,ch=getchar();!isdigit(ch);ch=getchar()) if (ch=='-') ok=1;
	for (x=0;isdigit(ch);x=x*10+ch-'0',ch=getchar());
	if (ok) x=-x;
}
const int maxn=1005;
const int maxk=1000005;
const int mod=1E9+7;
int fac[maxk],inv[maxk],invfac[maxk];
int n,m,k;
int ksm(int a,int b){
	int t;
	for (t=1;b;b>>=1,a=1LL*a*a%mod) if (b&1) t=1LL*t*a%mod;
	return t;
}
int C(int n,int m){
	return 1LL*fac[n]*invfac[m]%mod*invfac[n-m]%mod;
}
int main(){
	read(n),read(m),read(k);
	bool flag=(n==7&&m==8&&k==15);
	int lim=max(n,k);
	fac[0]=1;
	for (int i=1;i<=lim;i++) fac[i]=1LL*fac[i-1]*i%mod;
	inv[1]=1;
	for (int i=2;i<=lim;i++) inv[i]=1LL*(mod-mod/i)*inv[mod%i]%mod;
	invfac[0]=1;
	for (int i=1;i<=lim;i++) invfac[i]=1LL*invfac[i-1]*inv[i]%mod;
	int ans=0;
	for (int a=1;a<=min(n,k);a++){
		int res=0;
		for (int i=0;i<a;i++){
			int tmp=1LL*C(a,i)*ksm(a-i,n);
			if (i&1) tmp=mod-tmp;
			res=(res+tmp)%mod;
		}
		res=1LL*res*res%mod;
		res=1LL*res*C(k,a)%mod;
		if (flag) cout<<res<<endl;
		for (int b=2*a-k;b<=a;b++){
			ans=(ans+1LL*res*C(a,b)%mod*C(k-a,a-b)%mod*ksm(b,n*(m-2))%mod)%mod;
		}
	}
	printf("%d\n",ans);
	return 0;
}

#define  _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<map>
#include<cmath>
#include<vector>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<stack>
#include<math.h>
#include<set>
#include<string>
#include<cstring>
#include<queue>
#include<complex>
#include<assert.h>
#include<math.h>
#include<memory.h>
#include <stdlib.h>
#include<sstream>
#include<cstdio>
using namespace std;

#define rep(i,n) for(int i=0;i<n;i++)
#define repi(i,a,n) for(int i=a;i<n;i++)

#define mp make_pair
#define pb push_back
#define fastIO ios::sync_with_stdio(false)
#define read freopen("in.in","r",stdin)
#define write freopen("out.out","w",stdout)
#define scf(xx) scanf("%d",&xx)
#define All(a) a.begin(), a.end()
#define LSOne(S) (S & (-S))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef long double ld;

#define X first
#define Y second
int dx[] = { 0, 0, 1, -1, -1, -1, 1, 1 };
int dy[] = { 1, -1, 0, 0, 1, -1, 1, -1 };

pair<ll, pair<ll, ll> > extendedEuclid(ll a, ll b) {
	if (a == 0) return make_pair(b, make_pair(0, 1));
	pair<ll, pair<ll, ll> > p;
	p = extendedEuclid(b % a, a);
	return make_pair(p.first, make_pair(p.second.second - p.second.first*(b / a), p.second.first));
}

ll modInverse(ll a, ll m) {
	return (extendedEuclid(a, m).second.first + m) % m;
}

ll inverseMod(ll x, ll y, ll z){
	return ((x%z)*modInverse(y%z, z)) % z;
}

ll Bigmod(ll x, ll y, ll m) // computes (x^y)%m in O(log(y)) and without Overflow
{
	if (y == 0)
		return 1 % m;
	if (y % 2 == 0)
	{
		ll temp = Bigmod(x, y / 2, m);
		return (temp*temp) % m;
	}
	return (x%m * Bigmod(x, y - 1, m)) % m;
}

ll pre[1111], mod = 1e9 + 7, fact[1111];

ll C(ll n, ll k){
	return inverseMod(fact[n], fact[k] * fact[n - k], mod);
}

int main(){
	//fastIO;
//	read; write;
	fact[0] = fact[1] = 1;
	repi(i, 2, 1111)fact[i] = (fact[i - 1] * i) % mod;
	pre[1] = 1;
	ll n, m, k;
	cin >> n >> m >> k;
	repi(i, 2, n + 1){
		for (int j = 1; n - j >= i - 1; j++)  {
			pre[i] = (pre[i] + (pre[i - 1] * C(n, j)) % mod) % mod;
		}
	}
	if (m == 1) {
		cout << Bigmod(k, n, mod);
		return 0;
	}
	ll res = 0;
	for (ll d = 1; d <= min(k, n); d++){
		for (int cut = 1; cut < m; cut++){
			ll temp = C(k, d);
			temp = (temp*Bigmod(d, n*cut - n, mod)) % mod;
			temp = (temp * pre[d]) % mod;
			temp = (temp * C(k, d)) % mod;
			temp = (temp*Bigmod(d, n*(m-cut) - n, mod)) % mod;
			temp = (temp * pre[d]) % mod;
			res = (res + temp) % mod;
		}
	}
	cout << res << endl;
	return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <memory.h>

using namespace std;

const long long mod = 1000000007;
int n, m, K;

long long fact[1010000];
long long fact_inv[1010000];

long long pow(long long x, long long k)
{
	long long ret = 1;
	while (k > 0)
	{
		if (k & 1)
			ret = (ret * x) % mod;
		x = (x * x) % mod;
		k >>= 1;
	}
	return ret;
}

long long inv(long long x)
{
	return pow(x, mod - 2);
}

void calc_fact()
{
	fact[0] = fact_inv[0] = 1;
	for (int i = 1; i <= 1000000; ++i)
	{
		fact[i] = (fact[i - 1] * i) % mod;
		fact_inv[i] = inv(fact[i]);
	}
}

long long C(int n, int k)
{
	return ((fact[n] * fact_inv[n - k]) % mod * fact_inv[k]) % mod;
}

long long a[1010];

void calc_a()
{
	a[0] = 1;
	for (int k = 1; k <= n; ++k)
	{
		a[k] = pow(k, n);
		for (int i = k - 1; i > 0; --i)
		{
			int mlt = 1;
			if ((k - i) % 2)
				mlt = -1;
			a[k] = (a[k] + mlt * ((a[i] * C(k, i)) % mod) + mod) % mod;
		}
	}
}

int main()
{
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);

	cin >> n >> m >> K;

	if (m == 1)
	{
		cout << pow(K, n);
		return 0;
	}

	calc_fact();
	calc_a();

	long long res = 0;
	for (int kc = 0; kc <= n && kc <= K; ++kc)
	{
		for (int k = 0; k + k + kc <= K && k + kc <= n; ++k)
		{
			if (k + kc > 0)
			{
				long long x = (C(K, kc) * C(K - kc, k)) % mod;
				x = (x * C(K - kc - k, k)) % mod;
				x = (x * a[k + kc]) % mod;
				x = (x * a[k + kc]) % mod;
				x = (x * pow(kc, n * m - n - n)) % mod;
				res = (res + x) % mod;
			}
		}
	}

	cout << res;

	return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;

#define INF 0x3fffffff
#define LL long long
#define N 1005
#define M 1000005
#define MOD 1000000007
LL fac[M], dp[N][N];
LL mpow(LL a, LL p)
{
    LL ret = 1;
    while(p)
    {
        if(p & 1)   ret = (ret * a) % MOD;
        a = (a * a) % MOD;
        p = p >> 1;
    }
    return ret;
}
void init()
{
    int i;
    for(i = 1, fac[0] = 1; i < M; i++)
    {
        fac[i] = (fac[i - 1] * i) % MOD;
    }
}
LL C(int n, int m)
{
    if(n < m)   return 0;
    LL ret = (fac[n] * mpow(fac[m], MOD - 2)) % MOD;
    ret = (ret * mpow(fac[n - m], MOD - 2)) % MOD;
    return ret;
}
void doDP(int n, int m)
{
    int i, j;
    memset(dp, 0, sizeof(dp));
    dp[1][1] = m;
    for(i = 1; i < n; i++)
    {
        for(j = 1; j <= min(n, m); j++)
        {
            dp[i + 1][j] = (dp[i + 1][j] + dp[i][j] * j) % MOD;
            if(j < min(n, m))   dp[i + 1][j + 1] = (dp[i + 1][j + 1] + dp[i][j] * (m - j)) % MOD;
        }
    }
}
int main()
{
    int i, j;
    int n, m, c;
    init();
    while(scanf("%d%d%d", &n, &m, &c) != EOF)
    {
        LL ans = 0;
        doDP(n, c);
        if(m == 1)
        {
            ans = mpow(c, n);
        }
        else if(m == 2)
        {
            for(i = 1; i <= min(n, c); i++)
                ans = (ans + (dp[n][i] * dp[n][i]) % MOD) % MOD;
        }
        else
        {
            for(i = 1; i <= min(n, c); i++)
            {
                for(j = 1; j <= i && j <= c - 2 * i; j++)
                {
                    LL add = dp[n][i] * mpow(C(c, i), MOD - 2) % MOD;
                    add = add * add % MOD;
                    add = add * (C(c, j) * (C(c - j, i - j) * C(c - i, i - j) % MOD) % MOD) % MOD;
                    add = add * mpow(j, m * n - 2 * n) % MOD;
                    ans = (ans + add) % MOD;
                }
            }
        }
        printf("%I64d\n", ans);
    }
    return 0;
}

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define ll long long int
#define mem(x) memset(x,0,sizeof(x))
#define setbits(x)  __builtin_popcount(x)
#define ull unsigned long long int
#define all(c) (c).begin(),(c).end()
#define debug(x) cout<<#x<<" :: "<<x<<endl;
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<endl;
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";
#define db double
#define endl "\n"
#define  fbo(x) find_by_order(x)
#define  ook(x) order_of_key(x)

using namespace __gnu_pbds;
using namespace std;

typedef tree<pair<int,int>, null_type, less<pair<int,int>>, rb_tree_tag,
            tree_order_statistics_node_update>
    os1;
typedef tree<int, null_type, greater<int>, rb_tree_tag,
            tree_order_statistics_node_update>
    os2;
typedef vector< int > vi;
typedef vector< vi > vvi;
typedef pair<ll,ll > iil;
typedef pair<ll,int> li;
typedef pair<int,int> ii;
inline void fast()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
}
const ll pi=31;
const ll MOD[2] = {1187278649, 1149736019};//for double hashing
const ll mod=(ll)(1e9)+7;
ll pmod(ll x,ll n){
  ll r=1;
  while(n)
  {
    if(n&1LL)
      r=(r*x)%mod;
    x=(x*x)%mod;
    n=n/2;
  }
  return r;
}

//think recursively also
const ll N=2000;
ll fc[N+1],inv[N+1];
void pre()
{

  fc[0]=inv[0]=1;
  for(ll i=1;i<=N;i++)
  {
     fc[i]=fc[i-1]*i;
     fc[i]%=mod;
     inv[i]=pmod(fc[i],mod-2);
  }

}
ll C(ll n,ll r)
{
  if(n<r)
    return 0;
   ll ans=fc[n];
   ll ans1=(inv[n-r]*inv[r])%mod;
   ans=(ans1*ans)%mod;
   return ans;
}
ll Cp(ll n,ll s)
{
   ll ans=(pmod(n,s)-n+mod)%mod;
   return ans;
}
void solve()
{
  pre();
  ll n,m,k;
  cin>>n>>m>>k;
  ll ans=0;
  if(m==2)
  {

    for(ll i=1;i<=min(n,k);i++)
    { ll fs=1;
      fs=fs*(C(k,i)*C(k,i))%mod;
      fs=fs%mod;
      if(i>1)
      {
         fs=fs*(Cp(i,n)*Cp(i,n))%mod;
         //debug(Cp(i,n));
         fs=fs%mod;
      }
      ans=(ans+fs)%mod;
      ans%=mod;
    }
    cout<<ans<<endl;
    return ;
  }

  for(ll j=1;j<m;j++)
  {ll fs=1;
    for(ll i=1;i<=min(n,k);i++)
  {
    if(j==1)
    {
       fs=fs*C(k,i);
       fs%=mod;
       fs=fs*Cp(i,n);
    }
    else
    {
       fs=fs*pmod(i,m);
       fs=fs%mod;
    }
  }
  ans=ans+fs;
  ans%=mod;
  }
  cout<<ans<<endl;
}
int main()
{
   fast();
   // int t;
   // cin>>t;
   // for(int casee=1;casee<=t;casee++)
  {//cout<<"Case #"<<casee<<": ";
    solve();
  }

}

#include <bits/stdc++.h>
#define int long long int
using namespace std ;

const int N=1005 ;
const int K=1000005 ;
const int mod=1000000007 ;
int s[N][N]={0} ;
int fac[K]={0}, invfac[K]={0} ;

int po(int a, int b){
    if(a==0) return 1LL ;
	if(b==0) return 1LL ;
	int x=po(a,b/2) ;
	x=(x*x)%mod ;
	if(b%2==1){
		x=(x*a)%mod;
	}
	return x ;
}

int choose(int n, int k){
	return (((fac[n]*invfac[k])%mod)*invfac[n-k])%mod;
}

main()
{
	int n,m,k ;
	cin >> n >> m >> k ;

	s[0][0]=1 ;
	for(int i=1 ; i<=n ; i++){
		for(int j=1 ; j<=n ; j++){
			s[i][j]=(j*(s[i-1][j-1]+s[i-1][j]))%mod ;
		}
	}

	fac[0]=invfac[0]=1 ;
	for(int i=1 ; i<=k ; i++){
		fac[i]=(i*fac[i-1])%mod ;
		invfac[i]=(invfac[i-1]*po(i,mod-2)) ;
	}

	int tot=0 ;
	for(int i=1 ; i<=n ; i++){
		for(int j=0 ; j<=i ; j++){
			if((2*i-j)>k) continue ;
			if(j==0 and m>2) continue ;
			if(m==1 and j<i) continue ;
			if(m>=2){
				int intersect=choose(k,j) ;
				int other=(choose(k-j,i-j)*choose(k-i,i-j))%mod ;
				int third=(((po(n*(m-2),j)*s[n][i])%mod)*s[n][i])%mod ;
				tot+=(((intersect*other)%mod)*third)%mod ;
			}
            else if(m==1){
				tot+=(choose(k,i)*s[n][i])%mod ;
            }
            //cout << i << " " << j << " " << tot << endl ;
		}
	}

	cout << tot%mod << endl ;

    return 0 ;
}

#include<cstdio>
#include<cstring>
#include<algorithm>
#include<set>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<bitset>
#include<iomanip>
#include<iostream>
#include<cmath>
using namespace std;
#define rep(i,x,y) for(i=x;i<=y;i++)
#define _rep(i,x,y) for(i=x;i>=y;i--)
#define REP(i,x,y) for(int i=(x);i<=(y);i++)
#define _REP(i,x,y) for(int i=(x);i>=(y);i--)
#define CL(S,x) memset(S,x,sizeof(S))
#define CP(S1,S2) memcpy(S1,S2,sizeof(S2))
#define ALL(x,S) for(x=S.begin();x!=S.end();x++)
#define pb push_back
#define IN insert
#define ER erase
#define BE begin()
#define ED end()
#define LB lower_bound
#define UB upper_bound
#define mp make_pair
#define fi first
#define se second
#define upmin(x,y) x=min(x,y)
#define upmax(x,y) x=max(x,y)
#define COUT(S,x) cout<<fixed<<setprecision(x)<<S<<endl
template<class T> inline void read(T&x){bool fu=0;char c;for(c=getchar();c<=32;c=getchar());if(c=='-')fu=1,c=getchar();for(x=0;c>32;c=getchar())x=x*10+c-'0';if(fu)x=-x;};
template<class T> inline void read(T&x,T&y){read(x);read(y);}
template<class T> inline void read(T&x,T&y,T&z){read(x);read(y);read(z);}
inline char getc(){char c;for(c=getchar();c<=32;c=getchar());return c;}

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;

const int mod=1000000007;
ll pow(ll a,ll b,ll c){ll ans=1;for(;b;b>>=1,a=a*a%c)if(b&1)ans=ans*a%c;return ans;}

ll n,m,k,i,j,l,p,g;
ll fac[1111111],inv[1111111];

ll C(ll a,ll b){return fac[a]*inv[b]%mod*inv[a-b]%mod;}

int main()
{
    //freopen("1.in","r",stdin);freopen("1.out","w",stdout);
    fac[0]=1;rep(i,1,1000000)fac[i]=fac[i-1]*i%mod;
    rep(i,0,1000000)inv[i]=pow(fac[i],mod-2,mod);

    read(n,m,k);

    if(m==1){cout<<pow(k,n,mod)<<endl;return 0;}

    ll res=0,tt,z,r,w;
    rep(g,1,min(n,k))
    {
        tt=(pow(g,n,mod)-g*pow(g-1,n,mod))%mod;
        res=(res+C(k,g)*pow(tt,m,mod))%mod;
    }

    if(m==2)res=(res+k*(k-1))%mod;
    cout<<res<<endl;

    scanf("\n");
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAXN = 1005;
const int MOD = 1e9 + 7;
int s[MAXN][MAXN];
int fac[MAXN];
int cnn[MAXN * 2][MAXN];
int ckn[MAXN * 2];
void Pre() {
    s[0][0] = 1;
    int i,j;
    for(i = 1;i <= 1000;++i) {
        for(j = 1;j <= i;++j) {
            s[i][j] = ((1LL * s[i - 1][j] * j) % MOD + s[i - 1][j - 1]) % MOD;
        }
    }
    fac[0] = 1;
    for(i = 1;i <= 1000;++i)
        fac[i] = (1LL * fac[i - 1] * i) % MOD;
    cnn[0][0] = 1;
    for(i = 1;i <= 2000;++i) {
        cnn[i][0] = 1;
        for(j = 1;j <= min(i,1000);++j) {
            cnn[i][j] = (cnn[i - 1][j] + cnn[i - 1][j - 1]) % MOD;
        }
    }

}
void CalCkn(int k,int n) {
    memset(ckn,0,sizeof(ckn));
    ckn[0] = 1;
    n *= 2;
    for(int i = 1;i <= n;++i) {
        ckn[i] = (1LL * ckn[i - 1] * (k - i + 1)) % (1LL * i * MOD) / i;
    }
}
int PowerMod(int a,int n) {
    int c = 1,d = a;
    while(n) {
        if(n & 1) c = (1LL * c * d) % MOD;
        d = (1LL * d * d) % MOD;
        n >>= 1;
    }
    return c;
}
inline int Color(int r,int i) {
    return (1LL * fac[i] * s[r][i]) % MOD;
}
int main()
{
  int n,m,k,i,j,t1,t2,t3,ans;
  Pre();
  while(scanf("%d %d %d",&n,&m,&k) != EOF) {
      if(m == 1) {
          printf("%d\n",PowerMod(k,n));
          continue;
      }
      CalCkn(k,n);
      ans = 0;
      for(i = 1;i <= n;++i) {
          for(j = 0;j <= i;++j) {
              if(2 * i - j > k) continue;
              t1 = (1LL * ckn[2 * i - j] * cnn[2 * i - j][i - j]) % MOD;
              t2 = (1LL * cnn[i][i - j] * PowerMod(j,n * (m - 2))) % MOD;
              t3 = (1LL * Color(n,i) * Color(n,i)) % MOD;
              t1 = (1LL * t1 * t2) % MOD;
              ans = (ans + 1LL * t1 * t3) % MOD;
          }
      }
      printf("%d\n",ans);
  }
}

#include <algorithm>
#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;

long long MOD = 1000000007LL;
long long power(long long a , long long b)
{
    long long ret = 1;
    while(b)
    {
        if(b&1)ret = (ret * a) % MOD;
        a = (a * a) % MOD;
        b >>= 1;
    }
    return ret;
}
long long inv(long long x)
{
    return power(x , MOD - 2);
}
long long frac[1000001];
long long invfrac[1000001];
long long C(int a , int b)
{
    long long t = invfrac[b] * invfrac[a - b];
    t %= MOD;
    return (frac[a] * t) % MOD;
}
long long Fill[1001][1001]; // use i col , fill j

long long solve(int n , int m , int col)
{
    if(m == 1)
        return power(col , n);
    long long ans = 0;
    for(int pub = 0 ; pub <= min(n , col) ; pub ++)
        for(int add = 0 ; 2 * add + pub <= min(n , col) ; add ++)
        {
            int u = pub + add;
            long long cur = C(col , pub) * C(col - pub , add);
            cur %= MOD;
            cur *= C(col - pub - add , add);
            cur %= MOD;
            cur *= (Fill[u][n] * frac[u]) % MOD;
            cur %= MOD;
            cur *= (Fill[u][n] * frac[u]) % MOD;
            cur %= MOD;
            cur *= power(u , n * (m - 2));
            //cout << pub << " + " << add << " : " << cur << endl;
            ans = (ans + cur) % MOD;
        }
    return ans;
}

int main()
{
    //freopen("in.txt" , "r" , stdin);
    //freopen("out.txt" , "w" , stdout);
    ios :: sync_with_stdio(false);
    frac[0] = 1;
    invfrac[0] = 1;
    for(int i = 1 ; i <= 1000000 ; i++)
    {
        frac[i] = (frac[i - 1] * i) % MOD;
        invfrac[i] = inv(frac[i]);
    }
    memset(Fill , 0 , sizeof(Fill));
    Fill[0][0] = 1;
    for(int i = 1 ; i <= 1000 ; i++)
        for(int j = 1 ; j <= 1000 ; j++)
            Fill[i][j] = (Fill[i - 1][j - 1] + i * Fill[i][j - 1]) % MOD;
    int n , m , col;
    while(cin >> n >> m >> col)
        cout << solve(n , m , col) << endl;
    return 0;
}

#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <memory.h>

using namespace std;

const long long mod = 1000000007;
int n, m, K;

long long fact[101000];
long long fact_inv[101000];

long long pow(long long x, long long k)
{
	long long ret = 1;
	while (k > 0)
	{
		if (k & 1)
			ret = (ret * x) % mod;
		x = (x * x) % mod;
		k >>= 1;
	}
	return ret;
}

long long inv(long long x)
{
	return pow(x, mod - 2);
}

void calc_fact()
{
	fact[0] = fact_inv[0] = 1;
	for (int i = 1; i <= K; ++i)
	{
		fact[i] = (fact[i - 1] * i) % mod;
		fact_inv[i] = inv(fact[i]);
	}
}

long long C(int n, int k)
{
	return ((fact[n] * fact_inv[n - k]) % mod * fact_inv[k]) % mod;
}

long long a[1010];

void calc_a()
{
	a[0] = 1;
	for (int k = 1; k <= n; ++k)
	{
		a[k] = pow(k, n);
		for (int i = k - 1; i > 0; --i)
		{
			int mlt = 1;
			if ((k - i) % 2)
				mlt = -1;
			a[k] = (a[k] + mlt * (a[i] * C(k, i)) % mod + mod) % mod;
		}
	}
}

int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);

	cin >> n >> m >> K;

	if (m == 1)
	{
		cout << pow(K, n);
		return 0;
	}

	calc_fact();
	calc_a();

	long long res = 0;
	for (int kc = 0; kc <= n && kc <= K; ++kc)
	{
		for (int k = 0; k + k + kc <= K && k + kc <= n; ++k)
		{
			if (k + kc > 0)
			{
				long long x = (C(K, kc) * C(K - kc, k)) % mod;
				x = (x * C(K - kc - k, k)) % mod;
				x = (x * a[k + kc]) % mod;
				x = (x * a[k + kc]) % mod;
				x = (x * pow(kc, n * m - n - n)) % mod;
				res = (res + x) % mod;
			}
		}
	}

	cout << res;

	return 0;
}

#include <bits/stdc++.h>

#define F first
#define S second
#define llong long long
#define ullong unsigned long long
#define mp make_pair
#define pb push_back
#define pii pair <int, int>
#define cnt_bit __builtin_popcount

using namespace std;

const int MXN = (int)1e6 + 20;
const int INF = (int)1e9 + 7;
const llong LINF = (llong)1e18;
const double EPS = (double)1e-9;

int n, m, k;
llong f[MXN];
llong ans;
llong c[2100][2100];

llong binpow(llong x, llong y){
  llong res = 1LL;
  while(y){
    if(y & 1)
      res = (res * x) % INF;
    x = (x * x) % INF;
    y >>= 1;
  }
  return res;
}

llong cc(int n, int k){
  llong tmp = f[n];
  tmp = (tmp * binpow((f[n - k] * f[k]) % INF, INF - 2LL)) % INF;
  return tmp;
}

int main(){
  #ifdef LOCAL
    freopen("input.txt", "r", stdin);
  #endif
  ios_base::sync_with_stdio(0);
  c[0][0] = 1LL;
  for(int i = 1; i <= 2000; ++i){
    c[i][0] = c[i][i] = 1LL;
    for(int j = 1; j < i; ++j){
      c[i][j] = c[i][j - 1] + c[i - 1][j - 1];
      if(c[i][j] >= INF)
        c[i][j] -= INF;
    }
  }
  f[0] = 1LL;
  for(int i = 1; i < MXN; ++i){
    f[i] = (f[i - 1] * 1LL * i) % INF;
  }
  cin >> n >> m >> k;
  if(m == 1){
    cout << binpow(k, n);
  }
  else {
    for(int i = 1; i <= min(n, k); ++i){
      for(int j = 0; j <= i; ++j){
        if(i + i - j > k){
          continue;
        }
        llong tmp = binpow(i, n);
        for(int s = i - 1; s >= 1; --s){
          tmp -= (c[n][s] * binpow(s, n)) % INF;
          tmp = (tmp % INF + INF) % INF;
        }
        //cerr << i << " " << j << " " << tmp << "\n";
        tmp = (tmp % INF + INF) % INF;
        tmp = (tmp * tmp) % INF;
        //
        tmp = (tmp * cc(k, j)) % INF;
        tmp = (tmp * cc(k - j, i - j)) % INF;
        tmp = (tmp * cc(k - j - (i - j), i - j)) % INF;
        tmp = (tmp * binpow(j, n * (m - 2))) % INF;
        ans = (ans + tmp) % INF;
        //cerr <<"ans: "<< i << " " << j << " " << ans << "\n";
      }
    }
    cout << ans;
  }
  return 0;
}

#include <bits/stdc++.h>

using namespace std;

const int mod = 1e9 + 7;

const int N = 1e6;

int n, m, k;
int fact[N + 1];
int dp[N + 1]; // dp[i] = cate siruri de lungime n au i distincte

int put(int a, int b) {
  int res = 1;

  for (; b > 0; b >>= 1) {
    if (b & 1)
      res = (1LL * res * a) % mod;

    a = (1LL * a * a) % mod;
  }

  return res;
}

void Factoriale() {
  fact[0] = 1;

  for (int i = 1; i <= N; ++i)
    fact[i] = (1LL * fact[i - 1] * i) % mod;
}

int Invers(int x) {
  return put(x, mod - 2);
}

int Combinari(int a, int b) {
  int result = fact[a];
  result = (1LL * result * Invers(fact[b])) % mod;
  result = (1LL * result * Invers(fact[a - b])) % mod;
  return result;
}

void CalcSiruri() {
  for (int i = 1; i <= n; ++i) {
    dp[i] = put(i, n);

    for (int j = 1; j < i; ++j) {
      int val = (1LL * dp[j] * Combinari(i, j)) % mod;
      dp[i] = (mod + dp[i] - val) % mod;
    }
  }
}

int main() {
#ifndef ONLINE_JUDGE
  freopen("cf.in", "r", stdin);
#endif // ONLINE_JUDGE

  ios::sync_with_stdio(0);
  cin >> n >> m >> k;
  Factoriale();
  CalcSiruri();

  if (m == 1) {
    cout << put(k, n);
    return 0;
  }

  if (n == 1) {
    cout << put(k, m);
    return 0;
  }

  int result = 0;
  int start = (m == 2 ? 0 : 1);

  for (int distinct = 1; distinct <= n; ++distinct) {
    for (int common = start; common <= distinct; ++common) {
      int current = dp[distinct];
      current = (1LL * current * Combinari(k, distinct)) % mod;
      current = (1LL * current * Combinari(distinct, common)) % mod;
      current = (1LL * current * dp[distinct]) % mod;
      current = (1LL * current * Combinari(k - distinct, distinct - common)) % mod;
      current = (1LL * current * put(common, n * (m - 2))) % mod;
      result = (result + current) % mod;
    }
  }

  cout << result;
}

#include <bits/stdc++.h>

#define mp make_pair
#define pb push_back

using namespace std;

typedef long long ll;

const int md = 1e9 + 7;

ll p[1111];
ll f[1000010], inv[1000010];
int m, n, k;
ll ans;

ll pw(int a, int b){
	if (b == 0) return 1;
	ll tmp = pw(a, b / 2);
	tmp = tmp * tmp % md;
	if (b % 2) tmp = tmp * a % md;
	return tmp;
}

ll c(int b, int a){
	return f[b] * inv[a] % md * inv[b - a] % md;
}

int main(){
//	freopen("input.inp", "r", stdin);
	scanf("%d%d%d",&m,&n,&k);
	f[0] = inv[0] = 1;
	for(int i = 1; i <= max(k, m); ++i) f[i] = (f[i - 1] * i) % md, inv[i] = pw(f[i], md - 2);
	if (n == 1){
		printf("%I64d",pw(k, m));
		return 0;
	}
	for(int i = 1; i <= m; ++i){
		p[i] = pw(i, m);
		for(int j = 1; j < i; ++j){
			p[i] = (p[i] - c(i, j) * p[j]) % md;
			p[i] = (p[i] + md) % md;
		}
	}
	for(int i = 1; i <= m; ++i) p[i] = (p[i] * p[i]) % md;
	for(int i = 0; i <= k; ++i){
		ll tmp = 0;
		for(int j = 0; j + i <= n && j * 2 + i <= k; ++j){
			tmp += p[i + j] * c(k, i) % md * c(k - i, j) % md * c(k - i - j, j) % md;
			tmp %= md;
		}
		ans = (ans + tmp * pw(i, m * (n - 2))) % md;
	}
	printf("%I64d",ans);
	return 0;
}

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[1000005];
int n,m,k;

void init(){
    int i,j;
    fac[0]=1;
    for(i=1;i<1000005;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

lld Cal(int x,int y){
    lld tmp=fac[x]*Mul(fac[x-y]*fac[y]%mod,mod-2)%mod;
    return tmp;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1]*(k-j+1))%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }/*
        for(i=1;i<=10;i++){
           for(j=1;j<=i;j++){
                printf("%I64d ",dp[i][j]);
            }
            puts("");
        }*/
    //  printf("dp==%I64d\n",dp[2][1]);
        lld ans=0;
        if(m==1){
            printf("%I64d\n",Mul(k,n));
        }else{
            for(i=1;i<=n && i<=k;i++){//最左最右个有i
                for(j=(m!=2);j<=i;j++)//都有的j
                    if(k>=2*i-j){
                    lld tp=Cal(k,j)*Mul(j,n*(m-2))%mod;
                    lld tf=Cal(k-j,i-j)*Cal(k-i,i-j)%mod;

                    lld tg=dp[n][i]*dp[n][i]%mod;

                //  printf("dp[%d][%d]==%I64d\n",n,i,dp[n][i]);
                //  printf("tg==%I64d\n",tg);
                    ans=(ans+((tp*tf%mod)*tg%mod))%mod;
                }
            }
            printf("%I64d\n",ans);
        }

    }
    return 0;
}

//***************************************

/*

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[1000005];
int n,m,k;

void init(){
    int i,j;
    fac[0]=1;
    for(i=1;i<1000005;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

lld Cal(int x,int y){
    lld tmp=fac[x]*Mul(fac[x-y]*fac[y]%mod,mod-2)%mod;
    return tmp;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1])%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }
        lld ans=0;
        for(i=1;i<=10;i++){
            for(j=1;j<=i;j++){
                printf("%I64d ",dp[i][j]*fac[j]%mod);
            }
            puts("");
        }
        //printf("dp==%I64d\n",dp[2][1]*fac[1]%mod);
        if(m==1){
            printf("%I64d\n",Mul(k,n));
        }else{
            for(i=1;i<=n && i<=k;i++){//最左最右个有i
                for(j=(m!=2);j<=i;j++)//都有的j
                    if(k>=2*i-j){
                    lld tp=Cal(k,j)*Mul(j,n*(m-2))%mod;
                    lld tf=Cal(k-j,i-j)*Cal(k-i,i-j)%mod;
                    lld tg=((dp[n][i]*dp[n][i]%mod)*(fac[i]*fac[i]%mod))%mod;

                //  printf("dp[%d][%d]==%I64d\n",n,i,dp[n][i]*fac[i]%mod);
                //  printf("tg==%I64d\n",tg);
                    ans=(ans+((tp*tf%mod)*tg%mod))%mod;
                }
            }
            printf("%I64d\n",ans);
        }

    }
    return 0;
}*/

/** ` Micro Mezzo Macro Flation -- Overheated Economy ., **/

#include <algorithm>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <cmath>
#include <ctime>
#include <list>
#include <set>
#include <map>

using namespace std;

#define REP(i, n) for (int i=0;i<int(n);++i)
#define FOR(i, a, b) for (int i=int(a);i<int(b);++i)
#define DWN(i, b, a) for (int i=int(b-1);i>=int(a);--i)
#define REP_1(i, n) for (int i=1;i<=int(n);++i)
#define FOR_1(i, a, b) for (int i=int(a);i<=int(b);++i)
#define DWN_1(i, b, a) for (int i=int(b);i>=int(a);--i)
#define REP_C(i, n) for (int n____=int(n),i=0;i<n____;++i)
#define FOR_C(i, a, b) for (int b____=int(b),i=a;i<b____;++i)
#define DWN_C(i, b, a) for (int a____=int(a),i=b-1;i>=a____;--i)
#define REP_N(i, n) for (i=0;i<int(n);++i)
#define FOR_N(i, a, b) for (i=int(a);i<int(b);++i)
#define DWN_N(i, b, a) for (i=int(b-1);i>=int(a);--i)
#define REP_1_C(i, n) for (int n____=int(n),i=1;i<=n____;++i)
#define FOR_1_C(i, a, b) for (int b____=int(b),i=a;i<=b____;++i)
#define DWN_1_C(i, b, a) for (int a____=int(a),i=b;i>=a____;--i)
#define REP_1_N(i, n) for (i=1;i<=int(n);++i)
#define FOR_1_N(i, a, b) for (i=int(a);i<=int(b);++i)
#define DWN_1_N(i, b, a) for (i=int(b);i>=int(a);--i)
#define REP_C_N(i, n) for (n____=int(n),i=0;i<n____;++i)
#define FOR_C_N(i, a, b) for (b____=int(b),i=a;i<b____;++i)
#define DWN_C_N(i, b, a) for (a____=int(a),i=b-1;i>=a____;--i)
#define REP_1_C_N(i, n) for (n____=int(n),i=1;i<=n____;++i)
#define FOR_1_C_N(i, a, b) for (b____=int(b),i=a;i<=b____;++i)
#define DWN_1_C_N(i, b, a) for (a____=int(a),i=b;i>=a____;--i)

#define DO(n) while(n--)
#define DO_C(n) int n____ = n; while(n____--)
#define TO(i, a, b) int s_=a<b?1:-1,b_=b+s_;for(int i=a;i!=b_;i+=s_)
#define TO_1(i, a, b) int s_=a<b?1:-1,b_=b;for(int i=a;i!=b_;i+=s_)
#define SQZ(i, j, a, b) for (int i=int(a),j=int(b)-1;i<j;++i,--j)
#define SQZ_1(i, j, a, b) for (int i=int(a),j=int(b);i<=j;++i,--j)
#define REP_2(i, j, n, m) REP(i, n) REP(j, m)
#define REP_2_1(i, j, n, m) REP_1(i, n) REP_1(j, m)

#define ALL(A) A.begin(), A.end()
#define LLA(A) A.rbegin(), A.rend()
#define CPY(A, B) memcpy(A, B, sizeof(A))
#define INS(A, P, B) A.insert(A.begin() + P, B)
#define ERS(A, P) A.erase(A.begin() + P)
#define BSC(A, X) find(ALL(A), X) // != A.end()
#define CTN(T, x) (T.find(x) != T.end())
#define SZ(A) int(A.size())
#define PB push_back
#define MP(A, B) make_pair(A, B)

#define Rush int T____; RD(T____); DO(T____)
#pragma comment(linker, "/STACK:36777216")
#pragma GCC optimize ("O2")
#define Ruby system("ruby main.rb")
#define Haskell system("runghc main.hs")
#define Pascal system("fpc main.pas")

typedef long long LL;
typedef double DB;
typedef unsigned UINT;
typedef unsigned long long ULL;

typedef vector<int> VI;
typedef vector<char> VC;
typedef vector<string> VS;
typedef vector<LL> VL;
typedef vector<DB> VD;
typedef set<int> SI;
typedef set<string> SS;
typedef set<LL> SL;
typedef set<DB> SD;
typedef map<int, int> MII;
typedef map<string, int> MSI;
typedef map<LL, int> MLI;
typedef map<DB, int> MDI;
typedef map<int, bool> MIB;
typedef map<string, bool> MSB;
typedef map<LL, bool> MLB;
typedef map<DB, bool> MDB;
typedef pair<int, int> PII;
typedef pair<int, bool> PIB;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef vector<VII> VVII;
typedef set<PII> SII;
typedef map<PII, int> MPIII;
typedef map<PII, bool> MPIIB;

/** I/O Accelerator **/

/* ... :" We are I/O Accelerator ... Use us at your own risk ;) ... " .. */

template<class T> inline void RD(T &);
template<class T> inline void OT(const T &);

inline int RD(){ int x; RD(x); return x;}
template<class T> inline T& _RD(T &x){ RD(x); return x;}
inline void RC(char &c){scanf(" %c", &c);}
inline void RS(char *s){scanf("%s", s);}

template<class T0, class T1> inline void RD(T0 &x0, T1 &x1){RD(x0), RD(x1);}
template<class T0, class T1, class T2> inline void RD(T0 &x0, T1 &x1, T2 &x2){RD(x0), RD(x1), RD(x2);}
template<class T0, class T1, class T2, class T3> inline void RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3){RD(x0), RD(x1), RD(x2), RD(x3);}
template<class T0, class T1, class T2, class T3, class T4> inline void RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4){RD(x0), RD(x1), RD(x2), RD(x3), RD(x4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5){RD(x0), RD(x1), RD(x2), RD(x3), RD(x4), RD(x5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void RD(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5, T6 &x6){RD(x0), RD(x1), RD(x2), RD(x3), RD(x4), RD(x5), RD(x6);}
template<class T0, class T1> inline void OT(T0 &x0, T1 &x1){OT(x0), OT(x1);}
template<class T0, class T1, class T2> inline void OT(T0 &x0, T1 &x1, T2 &x2){OT(x0), OT(x1), OT(x2);}
template<class T0, class T1, class T2, class T3> inline void OT(T0 &x0, T1 &x1, T2 &x2, T3 &x3){OT(x0), OT(x1), OT(x2), OT(x3);}
template<class T0, class T1, class T2, class T3, class T4> inline void OT(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4){OT(x0), OT(x1), OT(x2), OT(x3), OT(x4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void OT(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5){OT(x0), OT(x1), OT(x2), OT(x3), OT(x4), OT(x5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void OT(T0 &x0, T1 &x1, T2 &x2, T3 &x3, T4 &x4, T5 &x5, T6 &x6){OT(x0), OT(x1), OT(x2), OT(x3), OT(x4), OT(x5), OT(x6);}

template<class T> inline void RST(T &A){memset(A, 0, sizeof(A));}
template<class T0, class T1> inline void RST(T0 &A0, T1 &A1){RST(A0), RST(A1);}
template<class T0, class T1, class T2> inline void RST(T0 &A0, T1 &A1, T2 &A2){RST(A0), RST(A1), RST(A2);}
template<class T0, class T1, class T2, class T3> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3){RST(A0), RST(A1), RST(A2), RST(A3);}
template<class T0, class T1, class T2, class T3, class T4> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4){RST(A0), RST(A1), RST(A2), RST(A3), RST(A4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5){RST(A0), RST(A1), RST(A2), RST(A3), RST(A4), RST(A5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void RST(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6){RST(A0), RST(A1), RST(A2), RST(A3), RST(A4), RST(A5), RST(A6);}
template<class T> inline void CLR(T &A){A.clear();}
template<class T0, class T1> inline void CLR(T0 &A0, T1 &A1){CLR(A0), CLR(A1);}
template<class T0, class T1, class T2> inline void CLR(T0 &A0, T1 &A1, T2 &A2){CLR(A0), CLR(A1), CLR(A2);}
template<class T0, class T1, class T2, class T3> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3){CLR(A0), CLR(A1), CLR(A2), CLR(A3);}
template<class T0, class T1, class T2, class T3, class T4> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4){CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5){CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4), CLR(A5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void CLR(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6){CLR(A0), CLR(A1), CLR(A2), CLR(A3), CLR(A4), CLR(A5), CLR(A6);}
template<class T> inline void CLR(T &A, int n){REP(i, n) CLR(A[i]);}
template<class T> inline void FLC(T &A, int x){memset(A, x, sizeof(A));}
template<class T0, class T1> inline void FLC(T0 &A0, T1 &A1, int x){FLC(A0, x), FLC(A1, x);}
template<class T0, class T1, class T2> inline void FLC(T0 &A0, T1 &A1, T2 &A2){FLC(A0), FLC(A1), FLC(A2);}
template<class T0, class T1, class T2, class T3> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3){FLC(A0), FLC(A1), FLC(A2), FLC(A3);}
template<class T0, class T1, class T2, class T3, class T4> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4){FLC(A0), FLC(A1), FLC(A2), FLC(A3), FLC(A4);}
template<class T0, class T1, class T2, class T3, class T4, class T5> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5){FLC(A0), FLC(A1), FLC(A2), FLC(A3), FLC(A4), FLC(A5);}
template<class T0, class T1, class T2, class T3, class T4, class T5, class T6> inline void FLC(T0 &A0, T1 &A1, T2 &A2, T3 &A3, T4 &A4, T5 &A5, T6 &A6){FLC(A0), FLC(A1), FLC(A2), FLC(A3), FLC(A4), FLC(A5), FLC(A6);}

template<class T> inline void SRT(T &A){sort(ALL(A));}
template<class T, class C> inline void SRT(T &A, C B){sort(ALL(A), B);}

/** Add - On **/

const int MOD = 1000000007;
const int INF = 0x7fffffff;
const DB PI = acos(-1.0);
const DB EPS = 1e-6;
const DB OO = 1e15;

// <<= ` 0. Daily Use .,

template<class T> inline void checkMin(T &a,const T b){if (b<a) a=b;}
template<class T> inline void checkMax(T &a,const T b){if (b>a) a=b;}
template <class T, class C> inline void checkMin(T& a, const T b, C c){if (c(b,a)) a = b;}
template <class T, class C> inline void checkMax(T& a, const T b, C c){if (c(a,b)) a = b;}
template<class T> inline T min(T a, T b, T c){return min(min(a, b), c);}
template<class T> inline T max(T a, T b, T c){return max(max(a, b), c);}
template<class T> inline T sqr(T a){return a*a;}
template<class T> inline T cub(T a){return a*a*a;}
int Ceil(int x, int y){return (x - 1) / y + 1;}

// <<= ` 1. Bitwise Operation .,

inline bool _1(int x, int i){return x & 1<<i;}
inline int _1(int i){return 1<<i;}
inline int _U(int i){return _1(i) - 1;};

inline int count_bits(int x){
    x = (x & 0x55555555) + ((x & 0xaaaaaaaa) >> 1);
    x = (x & 0x33333333) + ((x & 0xcccccccc) >> 2);
    x = (x & 0x0f0f0f0f) + ((x & 0xf0f0f0f0) >> 4);
    x = (x & 0x00ff00ff) + ((x & 0xff00ff00) >> 8);
    x = (x & 0x0000ffff) + ((x & 0xffff0000) >> 16);
    return x;
}

template<class T> inline T low_bit(T x) {
    return x & -x;
}

template<class T> inline T high_bit(T x) {
    T p = low_bit(x);
    while (p != x) x -= p, p = low_bit(x);
    return p;
}

// <<= ` 2. Modular Arithmetic Basic .,

inline void INC(int &a, int b){a += b; if (a >= MOD) a -= MOD;}
inline int sum(int a, int b){a += b; if (a >= MOD) a -= MOD; return a;}
inline void DEC(int &a, int b){a -= b; if (a < 0) a += MOD;}
inline int dff(int a, int b){a -= b; if (a < 0) a  += MOD; return a;}
inline void MUL(int &a, int b){a = (LL)a * b % MOD;}
inline int pdt(int a, int b){return (LL)a * b % MOD;}

inline int _I(int b){
	int a = MOD, x1 = 0, x2 = 1, q;
	while (true){
		q = a / b, a %= b;
		if (!a) return (x2 + MOD) % MOD;
		DEC(x1, pdt(q, x2));

		q = b / a, b %= a;
		if (!b) return (x1 + MOD) % MOD;
		DEC(x2, pdt(q, x1));
	}
}

inline void DIV(int &a, int b){MUL(a, _I(b));}
inline int qtt(int a, int b){return pdt(a, _I(b));}

// <<= ' 0. I/O Accelerator interface .,

template<class T> inline void RD(T &x){
    //cin >> x;
    //scanf("%d", &x);
    char c; for (c = getchar(); c < '0'; c = getchar()); x = c - '0'; for (c = getchar(); c >= '0'; c = getchar()) x = x * 10 + c - '0';
    //char c; c = getchar(); x = c - '0'; for (c = getchar(); c >= '0'; c = getchar()) x = x * 10 + c - '0';

}

//int ____Case;
template<class T> inline void OT(const T &x){
    cout << x << endl;
    //printf("%d\n", x);
    //printf("%.2lf\n", x);
    //printf("Case %d: %d\n", ++____Case, x);
}

#define For_each(it, A) for (SII::iterator it = A.begin(); it != A.end(); ++it)

/* .................................................................................................................................. */

const int N = 1001;

int A[N], C[N][N], F[N], G[N], S[N];
int n, m, k, res;

void dfs(int s = n, int k = 1){

    //cout << s << " " << k << endl;

    if (s == 0){

        int c = 0;
        REP(i, k){
            if (A[i]) c += A[i];
          //  cout << A[i] << " ";
        }
        //cout << endl;
    //cout << "C:" << c << endl;

        int a = ::k;

        int t = 1;

        FOR(i, 1, k){
            MUL(t, C[a][ A[i] ]);
            a -= A[i];
        }

        int tt = F[n];

        FOR(i, 2, k){
            REP(j, A[i]) DIV(tt, F[i]);
        }

        INC(G[c], pdt(t, tt));

/*
        if (m == 2){
            INC(res, pdt(ttt, ttt));
        }
        else {
            INC(res, ttt);
        }*/

    }
    else if (k > s){
        return;
    }
    else {

        REP(i, s+1){
            if (s - k * i < 0) return;
            A[k] = i;
            dfs(s - k * i, k + 1);
        }
    }
}

int main(){

    //freopen("in.txt", "r", stdin);
    //freopen("out.txt", "w", stdout);
    //ios::sync_with_stdio(false);

    REP(i, N) {C[i][0] = 1; REP_1(j, i) C[i][j] = sum(C[i-1][j-1], C[i-1][j]);}
    F[0] = 1; FOR(i, 1, N) F[i] = pdt(F[i-1], i);

    RD(n, m, k); dfs();

    REP_1(i, k){
        INC(S[i], G[i]);
        //cout << S[i] << endl;
        if (m == 1){
            INC(res, G[i]);
        }
        else {
            int t = G[i];

            MUL(t, t);

            //cout << t << endl;

            DO_C(m - 2){
                MUL(t, S[i]);
            }

            INC(res, t);
            //cout << res << endl;
        }
    }

    OT(res);
}

#include <bits/stdc++.h>

using namespace std;
#define int long long
const int N = 1e6 + 10, MOD = 1e9 + 7;
int fac[N], ifac[N], cnt[N];

int sum(int a, int b) {return ((a + b) % MOD + MOD) % MOD;}
int mul(int a, int b) {return (a * b) % MOD;}

int Pow(int n, int m)
{
    if (m == 0) return 1;
    int x = Pow(n, m / 2);
    return (mul(x, x) * (m % 2 ? n : 1)) % MOD;
}

int C(int n , int k)
{
    if (k < 0 || n < 0 || k > n) return 0;
    return mul( mul( fac[n] , ifac[k] ) , ifac[n - k] );
}

int32_t main()
{
    fac[0] = 1;
    for (int i = 1; i < N; i ++) fac[i] = mul(fac[i - 1], i);
    ifac[N - 1] = Pow(fac[N - 1] , MOD - 2);
    for (int i = N - 2; i >= 0; i --) ifac[i] = mul(ifac[i + 1], i + 1);
    int n, m, K, ans = 0; cin >> n >> m >> K;
    for (int i = 0; i <= n; i ++) {
        cnt[i] = Pow(i, n);
        for (int j = 0; j < i; j ++) cnt[i] = sum(cnt[i] , (-1) * mul(C(i, j) , cnt[j]));
    }
    for (int k = 0; k <= n; k ++) {
        for (int a = 0; a + k <= n; a ++) {
            ans += mul( mul( mul( mul( Pow(a, (m - 2) * n) , C(K, k) ) , C(K - k, k) ) , C(K - 2 * k, a) ) , Pow(cnt[a + k], 2));
            ans %= MOD;
        }
    }
    cout << ans << "\n";

    return 0;
}

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <cstdio>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <string.h>
#include <cassert>

using namespace std;

#define GI ({int t;scanf("%d",&t);t;})
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define REP(i,n) FOR(i,0,n)
#define pb push_back
#define sz size()
#define INF (int)1e9
#define EPS LD(1e-9)
#define DINF LD(1e50)
#define MOD LL(1000000007)

typedef long long LL;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int> > VVI;
typedef pair<int,int> PII;
typedef double LD;

const int mn=1003;
int m,n,k;
LL ncolors[mn], C[mn][mn];

LL power(LL a,LL b){
	if(!b)	return 1;
	if(b&1)	return a*power(a,b-1)%MOD;
	else{
		LL v=power(a,b>>1);
		return v*v%MOD;
	}
}

LL choose(LL n,LL r){
	LL ret=1, den=1;
	REP(i,r)	(ret*=(n-i))%=MOD;
	REP(i,r)	(den*=(i+1))%=MOD;
	return ret*power(den,MOD-2)%MOD;
}

int main(){

	m=GI, n=GI, k=GI;
	REP(i,mn)	REP(j,i+1){
		if(j==0 || j==i)	C[i][j]=1;
		else	C[i][j]=(C[i-1][j]+C[i-1][j-1])%MOD;
	}
	ncolors[0]=0;
	FOR(i,1,mn){
		ncolors[i]=power(i,m);
		for(int j=i-1;j>=0;j--){
			LL toadd=(C[i][j]*ncolors[j])%MOD;
			if((i-j)&1)	toadd=(MOD-toadd)%MOD;
			(ncolors[i]+=toadd)%=MOD;
		}
	}
	if(n==1)	{cout<<power(k,m)<<endl;return 0;}
	if(n==2){
		int to=min(m,k);
		LL ans=0;
		FOR(colors,1,to+1){
			LL v=choose(k,colors)*ncolors[colors]%MOD;
			(ans+=v*v)%=MOD;
		}
		cout<<ans<<endl;
		return 0;
	}
	LL ans=0;
	int to=min(m,k);
	FOR(colors,1,to+1){
		LL toadd=choose(k,colors)*ncolors[colors]%MOD*ncolors[colors]%MOD;
		(toadd*=power(colors,m*(n-2)))%=MOD;
		(ans+=toadd)%=MOD;
	}
	cout<<ans<<endl;
	return 0;
}

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<bitset>

#define ls (t<<1)
#define rs ((t<<1)+1)
#define mid ((l+r)>>1)
#define fi first
#define se second
#define mk make_pair

#define N 2005
#define M 200005
#define seed 23333
#define Mo 1000000007

using namespace std;
int i,j,m,n,p,k,C[N][N],f[N],ans;
int cal(int x,int y)
{
	 if (x<y) return 0;
	 return C[x][y];
}
int power(int x,int y)
{
	 int sum=1;
	 for (;y;y>>=1)
	 {
	 	 if (y&1) sum=1ll*sum*x%Mo;
	 	 x=1ll*x*x%Mo;
	 }
	 return sum;
}
void pre()
{
	  int i,j;
	  for (i=0;i<N;++i)
	  {
	  	   C[i][0]=1;
	  	   for (j=1;j<=i;++j) C[i][j]=(C[i-1][j-1]+C[i-1][j])%Mo;
	  }
	  f[1]=1;
	  for (i=2;i<N;++i)
	  {
	  	  f[i]=1ll*cal(k,i)*power(i,n)%Mo;
	  	  for (j=1;j<i;++j) f[i]=(f[i]-1ll*cal(k,j)*f[j]%Mo+Mo)%Mo;
	  }
}
int main()
{
	 scanf("%d%d%d",&n,&m,&k);
	 if (m==1) printf("%d\n",power(n*m,k));
	 else
	 {
	 	  pre();
	 	  for (i=0;i<=k;++i)
	 	     for (j=0;j<=k;++j)
	 	    {
	 	    	 int x=1ll*f[i+j]*f[i+j]%Mo*cal(k,i)%Mo*cal(k-i,j)%Mo*cal(k-i-j,j)%Mo;
	 	    	 ans=(ans+1ll*x*power(i,m-2)%Mo)%Mo;
	 	    }
	 	 printf("%d\n",ans);
	 }
}

#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

typedef long long LL;

const int MAXN = 1010;
const int MO = 1000000000 + 7;

int C[MAXN][MAXN];
int f[MAXN][MAXN];
int JIE[MAXN];
int n, m, k;

void pre()
{
  C[0][0] = 1;
  for (int i = 1; i < MAXN; ++i) {
    C[i][0] = C[i][i] = 1;
    for (int j = 1; j < i; ++j) {
      C[i][j] = ((LL)C[i-1][j-1] + C[i-1][j])%MO;
    }
  }

  f[1][1] = 1;
  for (int i = 2; i < MAXN; ++i) {
    f[i][1] = 1;
    for (int j = 2; j <= i; ++j) {
      f[i][j] = ((LL)f[i-1][j-1]*j + (LL)f[i-1][j] * j)%MO;
    }
  }

  JIE[1] = 1;
  for (int i = 2; i < MAXN; ++i) JIE[i] = (JIE[i-1]*i)%MO;
}

int POW(int x, int k)
{
  int res = 1;
  if (k == 1) return res;
  for (; k; k>>=1) {
    if (k&1) res = ((LL)res*x)%MO;
    x = ((LL)x*x)%MO;
  }
  return res;
}

void solve()
{
  if (m == 1) {
    printf("%d\n", POW(k, n));
    return;
  }

  int res = 0, tmp;
  int limit_i = min(n, k), limit_j;
  for (int i = 0; i <= limit_i; ++i) {
    limit_j = min(n-i, (k-i)/2);
    for (int j = 0; j <= limit_j; ++j) {
      tmp = ((LL)C[k][i] * C[k-i][j])%MO;
      tmp = ((LL)tmp * C[k-i-j][j])%MO;
      tmp = ((LL)tmp * f[n][i+j])%MO;
      tmp = ((LL)tmp * f[n][i+j])%MO;
      tmp = ((LL)tmp * POW(i, (m-2)*n))%MO;
      res = ((LL)res + tmp)%MO;
    }
  }

  printf("%d\n", res);
}

int main()
{
  pre();
  scanf("%d%d%d", &n, &m, &k);
  solve();
}

#include <algorithm>
#include <iostream>
#include <cstring>
#include <cmath>
using namespace std;

long long MOD = 1000000007LL;
long long power(long long a , long long b)
{
    long long ret = 1;
    while(b)
    {
        if(b&1)ret = (ret * a) % MOD;
        a = (a * a) % MOD;
        b >>= 1;
    }
    return ret;
}
long long inv(long long x)
{
    return power(x , MOD - 2);
}
long long frac[1000001];
long long invfrac[1000001];
long long C(int a , int b)
{
    long long t = invfrac[b] * invfrac[a - b];
    t %= MOD;
    return (frac[a] * t) % MOD;
}
long long Fill[1001][1001]; // use i col , fill j

long long solve(int n , int m , int col)
{
    if(m == 1)
        return power(col , n);
    long long ans = 0;
    for(int pub = 0 ; pub <= min(n , col) ; pub ++)
        for(int add = 0 ; 2 * add + pub <= min(n , col) ; add ++)
        {
            int u = pub + add;
            long long cur = C(col , pub) * C(col - pub , add);
            cur %= MOD;
            cur *= C(col - pub - add , add);
            cur %= MOD;
            cur *= (Fill[u][n] * frac[u]) % MOD;
            cur %= MOD;
            cur *= (Fill[u][n] * frac[u]) % MOD;
            cur %= MOD;
            cur *= power(pub , n * (m - 2));
            //cout << pub << " + " << add << " : " << cur << endl;
            ans = (ans + cur) % MOD;
        }
    return ans;
}

int main()
{
    //freopen("in.txt" , "r" , stdin);
    //freopen("out.txt" , "w" , stdout);
    ios :: sync_with_stdio(false);
    frac[0] = 1;
    invfrac[0] = 1;
    for(int i = 1 ; i <= 1000000 ; i++)
    {
        frac[i] = (frac[i - 1] * i) % MOD;
        invfrac[i] = inv(frac[i]);
    }
    memset(Fill , 0 , sizeof(Fill));
    Fill[0][0] = 1;
    for(int i = 1 ; i <= 1000 ; i++)
        for(int j = 1 ; j <= 1000 ; j++)
            Fill[i][j] = (Fill[i - 1][j - 1] + i * Fill[i][j - 1]) % MOD;
    int n , m , col;
    while(cin >> n >> m >> col)
        cout << solve(n , m , col) << endl;
    return 0;
}

/*
 * d.cpp
 *
 *  Created on: 2011-9-3
 *      Author: mac
 */
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
using namespace std;

const int MAX_N = 1000 + 10;
const int MOD = int(1e9) + 7;
int n, m, k;
typedef long long int64;
const int MAX_K = int(1e6) + 10;
int64 fact[MAX_K];
int64 invFact[MAX_K];
int64 dp[MAX_N][MAX_N] = { };

int64 powMemo[MAX_N];

int64 powMod(int64 x, int e) {
	if (!e)
		return 1;
	return (e & 1) ? powMod(x, e - 1) * x % MOD : powMod(x * x % MOD, e >> 1);
}

int64 comb(int n, int m) {
	return fact[n] * invFact[m] % MOD * invFact[n - m] % MOD;
}

int main() {
	for (int i = 0; i < MAX_K; ++i) {
		if (!i)
			fact[i] = 1;
		else
			fact[i] = (i * fact[i - 1]) % MOD;
		invFact[i] = powMod(fact[i], MOD - 2);
	}
	dp[0][0] = 1;
	for (int i = 1; i < MAX_N; ++i) {
		for (int j = 1; j <= i; ++j) {
			dp[i][j] = (dp[i - 1][j - 1] + j * dp[i - 1][j]) % MOD;
		}
	}
	cin >> n >> m >> k;
	int64 ans = 0;
	int free = (m - 2) * n;
	for (int i = 0; i < MAX_N; ++i) {
		powMemo[i] = powMod(i, free);
	}
	for (int nC = 1; nC <= min(n, k); ++nC) {
		for (int nSame = 0; nSame <= nC; ++nSame) {
			if (nC * 2 - nSame > k)
				continue;
			int64 tmp = comb(k, nSame) * comb(k - nSame, nC - nSame) % MOD;
			(tmp *= comb(k - nC, nC - nSame)) %= MOD;
			(tmp *= dp[n][nC] * dp[n][nC] % MOD * fact[nC] % MOD * fact[nC] % MOD) %= MOD;
			(tmp *= powMemo[nSame]) %= MOD;
			ans += tmp;
		}
	}
	cout << ans << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int N=1e6+50;
const int M=1e3+50;
const int mod=1e9+7;
int dp[M][M],f[N],inv[N];
void init(){
    inv[0]=inv[1]=f[0]=f[1]=1;
    for(int i=2;i<N;i++){
        f[i]=1LL*f[i-1]*i%mod;
        inv[i]=1LL*(mod-mod/i)*inv[mod%i]%mod;
    }
    for(int i=2;i<N;i++){
        inv[i]=1LL*inv[i-1]*inv[i]%mod;
    }
    dp[0][0]=1;
    for(int i=1;i<M;i++)
    for(int j=1;j<M;j++){
        dp[i][j]=(1LL*dp[i-1][j-1]+1LL*dp[i-1][j]*j%mod)%mod;
    }
}
int c(int n,int m){
    if(n<m||n<0||m<0) return 0;
    return (1LL*f[n]*inv[m]%mod)*inv[n-m]%mod;
}
int qp(int a,int b){
    int res=1;
    while(b){
        if(b&1) res=1LL*res*a%mod;
        a=1LL*a*a%mod;b>>=1;
    }
    return res;
}
int main(){
    int n,m,k;
    init();
    while(~scanf("%d%d%d",&n,&m,&k)){
        int res=0;
        for(int i=1;i<=min(n,k);i++){
            int ans=c(k,i);
            if(m==2){
                ans=qp(ans,m);
            }
            ans=1LL*ans*qp(1LL*dp[n][i]*f[i]%mod,m)%mod;
            //cout<<ans<<endl;
            res=(res+ans)%mod;
        }
        printf("%d\n",res);
    }
}

//In the name of Allah
//
//
//////////////////////
// Program:
// Written By Alireza Farhadi (LGM)
//////////////////////
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cctype>
#include <cmath>
#include <queue>
#include <stack>
#include <set>
#include <utility>
#include <vector>
#include <bitset>
#include <deque>
#include <iomanip>
#include <complex>
#include <fstream>
#include <sstream>
#include <map>
//#include <climits>
//#include <list>

using namespace std;

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

#define show(x) cerr<<((#x))<<" = "<<((x))<<" "<<endl
#define bit(a,b) (((a)>>(b))&1)
#define gcd __gcd
#define endl '\n'
#define bcnt(x) ((__builtin_popcount(x)))
#define sz(x) ((int((x).size())))
#define sqr(x) ((((x))*((x))))
#define fx(x) fixed<<setprecision(x)

template<class T> inline void smn(T &a,const T &b){if(b<a) a=b;}
template<class T> inline void smx(T &a,const T &b){if(b>a) a=b;}
template<class T> inline T rev(const T & a){T _=a; reverse(_.begin(),_.end()); return _;}

typedef long long ll;
typedef long double ld;
typedef pair<int,int> pie;

const double eps=1e-9;
const ld leps=1e-14;
const int MN=1000*1000+100,MOD=1000*1000*1000+7;
int fac[MN],fll[MN],rfac[MN],pp[MN],pp2[MN];
inline int mul(const int & a,const int & b) { return ((ll(a)*b)%MOD); }
int pw(int a,int b)
{
	int s=1,q=a;
	while (b)
	{
		if (b%2) s=mul(s,q);
		b/=2;
		if (b) q=mul(q,q);
	}
	return s;
}
int c(int a,int b) { return mul(fac[a],mul(rfac[b],rfac[a-b]));}
int n,m,k,res;
int main()
{
	ios_base::sync_with_stdio(false);
	cin>>n>>m>>k;
	fac[0]=rfac[0]=1;
	for (int i=1;i<=k;i++) fac[i]=mul(fac[i-1],i),rfac[i]=pw(fac[i],MOD-2);
	for (int i=0;i<=n;i++) pp[i]=pw(i,n*(m-2)),pp2[i]=pw(i,n);
	for (int i=1;i<=n;i++)
	{
		for (int j=i,t=1;j>0;j--,t*=-1)
			fll[i]=(fll[i]+t*mul(c(i,j),pp2[j]))%MOD;
		fll[i]=mul(fll[i],fll[i]);
	}
	if (m==1) res=pp2[k];
	else
		for (int i=0;i<=n;i++) for (int j=0;i+j<=n && 2*i+j<=k;j++) if (i+j>0)
		{
			res+=mul(mul(mul(mul(c(k,j),c(k-j,i)),c(k-j-i,i)),fll[i+j]),pp[j]);
			if (res>=MOD) res-=MOD;
		}
	cout<<res<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod=1e9+7;
const int maxn=1e6;
const int maxm=1e4;
ll p[maxn+10];
ll inv[maxn+10];
ll dp[maxm+10];
int n,m,k;
ll mul(ll a,ll b)
{
    ll ans=1;
    while(b)
    {
        if(b&1)
            ans=ans*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ans;
}
ll c(int nn,int mm)
{
    if(mm>nn)
        return 0ll;
    if(mm==nn)
        return 1ll;
    return (p[nn]*inv[mm]%mod)*inv[nn-mm]%mod;
}
void init()
{
    p[0]=1;
    for(int i=1; i<=maxn; i++)
        p[i]=p[i-1]*i%mod;
    for(int i=0; i<=maxn; i++)
        inv[i]=mul(p[i],mod-2);
}
int main()
{
    init();
    while(~scanf("%d%d%d",&n,&m,&k))
    {
        ll ans=0;
        if(m==1)
        {
            ans=mul(k,n);
        }
        else
        {
            for(int i=1; i<=k&&i<=n; i++)
            {
                dp[i]=mul(i,n);
                for(int j=1; j<i; j++)
                {
                    dp[i]=(dp[i]-c(i,j)*dp[j]%mod+mod)%mod;
                }
            }

            if(m==2)
            {
                ll tmp;
                for(int i=1; i<=k; i++)
                {
                    tmp=dp[i]*dp[i]%mod;
                    ll zh=c(k,i);
                    tmp=tmp*(zh*zh%mod)%mod;
                    ans=(ans+tmp)%mod;
                }
            }
            else
            {
                for(int i=1; i<=n&&i<=k; i++)
                {
                    for(int j=0; j<=n&&j<=k; j++)
                    {
                        if(k<2*j+i||i+j>n)
                            break;
                        ll tmp=dp[i+j]*dp[i+j]%mod;
                        tmp=((tmp*c(k,i)%mod)*c(k-i,j)%mod)*c(k-i-j,j)%mod;
                        tmp=(tmp*mul(i,n*(m-2)))%mod;
                        ans=(ans+tmp)%mod;
                    }
                }
            }
        }
        printf("%lld\n",ans);
    }
    return 0;
}

#include <iomanip>
#include <algorithm>
#include <numeric>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <deque>
#include <list>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <complex>
#include <cassert>
#include <bitset>
using namespace std;

#define forn(i,n) for(int i=0;i<(int)(n);i++)
#define si(c) ((int)(c).size())
#define forsn(i,s,n) for(int i = (int)(s); i<((int)n); i++)
#define dforsn(i,s,n) for(int i = (int)(n)-1; i>=((int)s); i--)
#define decl(v, c) typeof(c) v = c
#define forall(i, c) for(decl(i, c.begin()); i!=c.end(); ++i)
#define dforall(i, c) for(decl(i, c.rbegin()); i!=c.rend(); ++i)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define D(a) cerr << #a << "=" << a << endl;
#define pb push_back
#define eb emplace_back
#define mp make_pair

#ifdef LOCAL
#define printLong(x) cout << x << endl
#define readLong(x) cin >> x
#else
#define printLong(x) printf("%I64d\n",x)
#define readLong(x) scanf("%I64d", &x)
#endif

typedef long long int tint;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<tint> vt;
typedef vector<vt> vvt;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vpii;

const int MAXN = 1010;
const int MAXK = 1e6 + 10;
const int MOD = 1e9 + 7;

int stirling[MAXN][MAXN];
tint fact[MAXK];

int expomod(tint a, int e) {
    tint res = 1;
    while (e) {
        if (e&1) res = res*a%MOD;
        e /= 2;
        a = a*a%MOD;
    }
    return res;
}

int inv(int x) { return expomod(x,MOD-2); }

int comb(int m, int n) {
    if (m < 0 || n < 0 || n > m) return 0;
    return fact[m] * inv(fact[n]) % MOD * inv(fact[m-n]) % MOD;
}

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);

    fact[0] = 1;
    forsn(n,1,MAXK) fact[n] = n*fact[n-1]%MOD;

    stirling[0][0] = 1;
    forsn(n,1,MAXN) forsn(k,1,n+1) stirling[n][k] = (tint(k)*stirling[n-1][k] + stirling[n-1][k-1]) % MOD;
    forn(n,MAXN) forn(k,MAXN) stirling[n][k] = fact[k]*stirling[n][k] % MOD;

    int n,m,k; cin >> n >> m >> k;
    tint res = 0;
    forn(inter,min(n,k)+1) forn(extra,min(n,k)+1-inter) {
        int a = inter+extra, b = inter;
        tint pos = stirling[n][a] * comb(k,inter) % MOD * comb(k-inter,extra) % MOD;
        //cerr << a << ' ' << b << ' ' << pos << endl;
        if (m > 1) {
            pos = pos*stirling[n][a] %MOD * comb(k-a, extra) % MOD;
            //cerr << a << ' ' << b << ' ' << pos << endl;
            pos = pos*expomod(b,n*(m-2))%MOD;
        }
        res += pos;
    }
    res %= MOD; if (res < 0) res += MOD;
    cout << res << endl;

    return 0;
}

#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
#define MOD 1000000007
long long ans,f[1000005],h[1000005],g[1000005],t;
long long n,m,k;
long long pow1(long long a,long long b)
{
	long long t=1;
	while (b)
	{
		if (b&1) t=t*a%MOD;
		a=a*a%MOD;
		b=b>>1;
	}
	return t;
}
long long C(long long a,long long b)
{
	return h[a]*g[b]%MOD*h[a-b]%MOD;
}
int main()
{
//	freopen("t.txt","r",stdin);
	scanf("%I64d%I64d%I64d",&n,&m,&k);
	if (m==1)
	{
		printf("%I64d",pow1(k,n));
		return 0;
	}
	for (long long i=0;i<=1000000;i++)
	h[i]=g[i]=1;
	for (long long i=1;i<=1000000;i++)
	h[i]=h[i-1]*i%MOD,g[i]=pow1(h[i],MOD-2);
    for (long long i=1;i<=min(n,k);i++)
    {
    	f[i]=pow1(i,n);
    	for (long long j=1;j<i;j++)
    	f[i]=(f[i]-C(i,j)*f[j]%MOD+MOD)%MOD;
    }
	if (m==2)
	{
		for (long long i=1;i<=min(n,k);i++)
		{
			t=f[i]*f[i]%MOD;
			t=t*C(k,i)%MOD*C(k,i)%MOD;
			ans=(ans+t)%MOD;
		}
	}
	else
	{
		for (long long i=1;i<=min(n,k);i++)
		for (long long j=0;j<=min(n,k);j++)
		{
			if (k<2*j+i||i+j>n)
			{
				t=f[i+j]*f[i+j]%MOD;
				t=t*C(k,i)%MOD*C(k-i,j)%MOD*C(k-i-j,j)%MOD;
				t=t*pow1(i,n*(m-2))%MOD;
				ans=(ans+t)%MOD;
			}
		}
	}
	printf("%I64d",ans);
}

#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <iostream>
#include <cmath>
#include <sstream>
#include <map>
#include <set>
#include <numeric>
#include <memory.h>
#include <cstdio>
#include <assert.h>

using namespace std;

#define pb push_back
#define INF 1011111111
#define FOR(i,a,b) for (int _n(b), i(a); i < _n; i++)
#define rep(i,n) FOR(i,0,n)
#define ford(i,a,b) for(int i=(a),_b=(b);i>=_b;--i)
#define CL(a,v) memset((a),(v),sizeof(a))
#define mp make_pair
#define X first
#define Y second
#define all(c) (c).begin(), (c).end()
#define SORT(c) sort(all(c))

typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> pii;

const ll MOD = 1000000007;
const int maxn = 1001;

ll C[2*maxn+1][2*maxn+1];
ll dp[maxn*2+1];

ll pow(ll x, ll n)
{
    ll ans = 1;

    for(; n>0; n >>= 1)
    {
        if(x&1) (ans *= x) %= MOD;
        (x *= x) %= MOD;
    }

    return ans % MOD;
}

ll inv(ll x)
{
    return pow(x, MOD - 2);
}

int main()
{
	#ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        //freopen("output.txt","w",stdout);
	#endif

    {
        CL(C,0);

        rep(i,2*maxn+1)
        {
            C[i][0] = C[i][i] = 1;

            FOR(j,1,i) (C[i][j] = C[i-1][j] + C[i-1][j-1]) %= MOD;
        }
    }

    int n,m,k;
    cin >> n >> m >> k;

    if(m == 1)
    {
        cout << pow(k, n) << endl;
        return 0;
    }

    CL(dp,0);

    FOR(i,1,maxn*2+1)
    {
        dp[i] = pow(i,n);

        for(int j = i - 1; j >= 1; --j)
        {
            dp[i] -= C[i][j] * dp[j] % MOD;
            (dp[i] += MOD) %= MOD;
        }
    }

    ll ans = 0;

    FOR(total, 1, min(k,2*n) + 1)
    {
        for(int common = total&1; common <= total; common += 2)
        {
            int single = (total - common) >> 1;

            if(single + common > n) continue;

            ll tans = pow(common, n*(m-2));

            rep(k,2) (tans *= dp[single + common]) %= MOD;

            (tans *= C[total][common]) %= MOD;
            (tans *= C[total - common][single]) %= MOD;
            (tans *= C[k][total]) %= MOD;

            if((ans += tans) >= MOD) ans -= MOD;
        }
    }

    cout << ans << endl;

	return 0;
}

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cassert>
using namespace std;
#define REP(i,b,n) for(int i=b;i<n;i++)
#define rep(i,n)      REP(i,0,n)
#define pb push_back
#define mp make_pair
#define ALL(C)   (C).begin(),(C).end()
template<class T> void vp(T &a,int p){rep(i,p)cout << a[i]<<" ";cout << endl;}
typedef complex<double>P;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
const ll mod = 1000000007;
const int N = 1010;

ll comb[N][N];
void precalc(){
  comb[0][0]=1;
  REP(i,1,N){
    comb[i][i]=comb[i][0]=1;
    REP(j,1,i)comb[i][j]=(comb[i-1][j-1]+comb[i-1][j])%mod;
  }
}

const int M = 10000001;
ll fact[M];
void precalcFact(){
  fact[0]=1;
  REP(i,1,M)fact[i]=(fact[i-1]*i)%mod;
}

ll mypow(ll n,ll p){
  if (p == 0)return 1;
  if (p == 1)return n;
  ll ret=mypow(n,p/2);
  ret=ret*ret%mod;
  if (p&1)ret=ret*n%mod;
  return ret;
}

ll getinv(ll a){
  return mypow(a,mod-2);
}

//n! = a * p^e を計算する。
//a とe　それぞれがもとまる。
//log_p(n):テーブル有
//min(n,p)*log_p(n):テーブル有
ll modFact(ll n,ll p,ll &e){
  e=0;
  if (n == 0)return 1;
  ll res = modFact(n/p,p,e);
  e+=n/p;
  ll f = 1;
  //REP(i,2,n+1)f=f*i%p;//pがテーブルを作れるサイズならテーブルを作るべき。
  assert(n < M);
  f = fact[n];
  if ((n/p) % 2 != 0)return res*(p-f)%p;
  return res*f%p;
}

//p=mod
//min(n,p)log_p
ll modComb(ll n,ll k,ll p){
  if (n < 0 || k < 0 || n < k)return 0;
  ll e1,e2,e3;
  ll a1=modFact(n,p,e1),a2=modFact(k,p,e2),a3=modFact(n-k,p,e3);
  if (e1 > e2+e3)return 0;
  return a1 * getinv(a2*a3%p)%p;
}

ll modComb2(int n,int k,ll p){
  ll ue=1,sita=k,sita2;
  ue=fact[n];
  sita=fact[k];
  sita2=fact[n-k];
  return ue*getinv(sita*sita2%mod)%mod;
}

ll dp[N][N];//1*i番のグリッドをj色で塗る場合の数。
void precalc2(){
  rep(i,N)rep(j,N)dp[i][j]=0;
  dp[0][0]=1;
  REP(i,1,N){
    REP(j,1,i+1){
      dp[i][j]=(dp[i-1][j-1]+(dp[i-1][j]*j)%mod)%mod;
    }
  }
}

ll solve(int r,int c,int k){
  if (c == 1){
    ll ret=0;
    /*
    REP(i,1,min(k,r)+1){
      ll tmp = dp[r][i]*modComb2(k,i,mod)%mod;
      ret+=tmp;
      ret%=mod;
    }
    */
    return mypow(r,k);
  }
  if (c == 2){
    ll ret= 0;
    REP(i,1,min(k,r)+1){
      ll  a = modComb(k,i,mod)*dp[r][i]%mod;
      a=a*fact[i]%mod;
      ret=ret+(a*a)%mod;
      ret%=mod;
    }
    return ret;
  }
  ll ret=0;
  REP(i,1,min(k,r)+1){
    rep(common,i+1){
      ll cmb1 = modComb(k,common,mod);
      ll cmb2 = modComb(k-common,i-common,mod);
      ll cmb3 = modComb(k-common-(i-common),i-common,mod);

      ll tmp = ((cmb1*cmb2%mod)*cmb3)%mod;
      ll tmp2 =mypow(common,r*(c-2));
      ll tmp3=dp[r][i]*fact[i]%mod;
      ll tmp4=(tmp*tmp2)%mod;
      tmp3=tmp3*tmp3%mod;
      tmp4=tmp4*tmp3%mod;
      ret+=tmp4;
      ret%=mod;
    }
  }
  return ret;
}
/*
1 3
2 864
3 1188

*/

main(){
  precalc();
  precalc2();
  precalcFact();
  int r,c,k;
  while(cin>>r>>c>>k){
#ifdef DEBUG
    time_t et_0 = clock();
#endif
    cout << solve(r,c,k) << endl;
#ifdef DEBUG
    time_t et_1 = clock();
    fprintf(stderr, "Execution time = %0.0lf ms\n", (et_1 - et_0) * 1000.0 / CLOCKS_PER_SEC);
#endif

#ifdef DEBUG
    cout <<"end " <<  endl;
#endif
  }
  return false;
}

		//			- -- --- ---- -----be name khoda----- ---- --- -- -			\\

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const int N = 1221, MOD = 1e9 + 7;

ll n, m, k, t[N], c[N][N];

ll pw(int p, int t)
{
	if(!t)
		return 1;
	ll res = pw(p, t / 2);
	res = res * res % MOD;
	if(t % 2)
		res *= p;
	return res % MOD;
}

void fil()
{
	for(int i = 0; i < N; i++)
		c[i][i] = c[0][i] = 1;
	for(int i = 1; i < N; i++)
		for(int j = i + 1; j < N; j++)
			c[i][j] = (c[i - 1][j - 1] + c[i][j - 1]) % MOD;

	t[0] = 0;
	for(int c = 1; c <= min(k, m); c++)
		t[c] = ((pw(c, m) - t[c - 1] * c) % MOD + MOD)% MOD;
}

int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cin >> n >> m >> k;
	swap(n, m);
	fil();
	if(n < 3)
	{
		ll ans = 0;
		for(int i = 0; i <= min(m, k); i++)
		{
			ll cr = t[i] * c[i][k] % MOD;
			if(n == 1)
				ans += cr;
			else
				ans += cr * cr % MOD;
		}
		cout << ans << endl;
		return 0;
	}
	ll ans = 0;
	for(int i = 1; i <= min(m, k); i++)
		ans += pw(t[i], 2) * c[i][k] % MOD * pw(i, n * m - 2 * m) % MOD;
	cout << ans % MOD << endl;
}

#include <iostream>
#include <algorithm>
#include <math.h>
#include <set>
#include <vector>
#include <string>
#include <iomanip>
#include <stack>
#include <map>
#include <bitset>
#include <deque>
#include <functional>
#include <queue>
#include <unordered_map>
using namespace std;

typedef long long ll;

#define all(v) v.begin(), v.end()
#define pb push_back
#define xx first
#define yy second

const int maxn = 100 * 1000 + 100;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const int delta = 11057;

ll pw(ll a, ll b, ll c = mod){
	if (b == 0)return 1;
	ll ans = pw(a, b / 2, c);
	ans = (ans*ans) % c;
	if (b & 1)ans = (ans*a) % c;
	return ans;
}
ll n, m, k,dp[1001][1001],res;
struct combine{
	ll fact[maxn], inv[maxn];
	void load(){
		fact[0] = 1; inv[0] = 1;
		for (int i = 1; i < maxn; i++)fact[i] = (fact[i - 1] * i) % mod;
		for (int i = 1; i < maxn; i++)inv[i] = (inv[i - 1] * pw(i, mod - 2)) % mod;
	}
	ll get(ll n, ll k){
		if (n < k)return 0;
		return fact[n] * inv[k] % mod*inv[n - k] % mod;
	}
}comb;
int main()
{
	ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	comb.load();
	cin >> n >> m >> k;
	if (m == 1){
		cout << pw(k, n); exit(0);
	}
	dp[0][0] = 1;
	for (int i = 1; i <= n; i++){
		for (int j = 1; j <= i; j++){
			dp[i][j] = (dp[i - 1][j] * j%mod + dp[i - 1][j - 1]*j%mod)%mod ;
		}
	}
	for (int y = 0; y <= n; y++){
		for (int x = y; x <= n; x++){
			ll ans = comb.get(k, 2 * x - y)*comb.get(2 * x - y, x - y)%mod*comb.get(x, x - y)%mod*pw(y,n*(m-2))%mod*dp[n][x]%mod*dp[n][x]%mod;
			res += ans;
			res%=mod;
		}
	}
	cout << res;
	return 0;
}

#include <bits/stdc++.h>
using namespace std;

const int N = 1100000;
const int mod = 1000000007;

int L[N], LL[N], R[N], RR[N];

int f[N], g[N], inv[N];

void init() {
	inv[1] = 1;
	for (int i = 2; i < N; i++) inv[i] = 1LL * inv[mod % i] * (mod - mod / i) % mod;
	f[0] = g[0] = 1;
	for (int i = 1; i < N; i++) {
		f[i] = 1LL * f[i-1] * i % mod;
		g[i] = 1LL * g[i-1] * inv[i] % mod;
	}
}

inline int nCm(int n, int m) {
	if (m < 0 || m > n) return 0;
	return 1LL * f[n] * g[m] % mod * g[n - m] % mod;
}

int modExp(int a, int n) {
	int ret = 1;
	for (; n; n >>= 1, a = 1LL * a * a % mod) if (n & 1) ret = 1LL * ret * a % mod;
	return ret;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	init();
	int n, m, k; scanf("%d%d%d", &n, &m, &k);
	int ans = 0;
	for (int i = n; i < n * m; i += n) {
		int j = n * m - i;
		L[1] = R[1] = LL[1] = RR[1] = 1;
		for (int t = 2; t <= k; t++) {
			L[t] = (modExp(t, i) + mod - 1LL * L[t-1] * t % mod) % mod;
			LL[t] = (LL[t-1] + L[t]) % mod;
			R[t] = (modExp(t, j) + mod - 1LL * R[t-1] * t % mod) % mod;
			RR[t] = (RR[t-1] + R[t]) % mod;
		}
		for (int t = 1; t <= k; t++) {
			int way = nCm(k, t);
			(ans += 1LL * L[t] * R[t] % mod * way % mod * way % mod) %= mod;
//			cerr << L[t] << " " << R[t] << " " << way << endl;
		}
	}
	cout << ans << endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define sd(mark) scanf("%d",&mark)
#define ss(mark) scanf("%s",&mark)
#define sl(mark) scanf("%lld",&mark)
#define debug(mark) printf("check%d\n",mark)
#define clr(mark) memset(mark,0,sizeof(mark))
#define F first
#define S second
#define MP make_pair
#define PB push_back
#define ll long long
#define mod 1000000007
#define N 1000010
ll dp[N];
ll fact[N],inv[N];
ll pow1(ll a,ll b)
{
	if(b==0)	return 1;
	ll ret=pow1(a,b/2);
	ret=(ret*ret)%mod;
	if(b&1)	ret=(a*ret)%mod;
	return ret;
}
ll C(ll n,ll r)
{
	if(n<r || n<0 || r<0)
		return 0;
	ll ret=fact[n]*inv[r]%mod;
	return ret*inv[n-r]%mod;
}
int main()
{
	int n,m,i,j,k;
	sd(n);sd(m);sd(k);
	//if(m==1)
	//	return 0*printf("%lld\n",pow1(k,n));
	// for(i=0;i<N;++i)
	// 	clr(C[i]);
	// C[0][0]=1;
	// for(i=1;i<N;++i)
	// {
	// 	C[i][0]=C[i][i]=1;
	// 	for(j=1;j<i;++j)
	// 		C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
	// }
	fact[0]=1;
	for(i=1;i<N;++i)
		fact[i]=fact[i-1]*i%mod;
	for(i=0;i<N;++i)
		inv[i]=pow1(fact[i],mod-2);
	dp[0]=0;
	dp[1]=1;
	for(i=2;i<=n;++i)
	{
		dp[i]=pow1(i,n);
		for(j=1;j<i;++j)
			dp[i]=(dp[i]-C(i,j)*dp[j]%mod+mod)%mod;
	}
	ll ans=0;
	for(i=0; i<=n && i*2 <= k;++i)
	{
		for(j=0;i+j<=n && i*2+j <= k;++j)
		{
			ll temp=C(k,i)*C(k-i,i)%mod;
			temp=temp*C(k-2*i,j)%mod;
			temp=temp*dp[i+j]%mod;
			temp=temp*dp[i+j]%mod;
			temp=temp*pow1(j,n*(m-2))%mod;
			ans=(ans+temp)%mod;
			//cout<<i<<' '<<j<<' '<<temp<<'\n';
		}
	}
	printf("%lld\n",ans);
	//cout<<dp[2]<<'\n';
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 3e3+5, mod = 1e9+7;
int dp[N][N], fac[N], inv[N], n, m, k, rt;
int zrb(int a, int b) { return(1LL*a*b%mod); }
int  jm(int a, int b) { int tmp = (a+b)%mod; while(tmp<0) tmp+=mod; return(tmp); }
int  pw(int a, int b) { int rt=1; for(;b;b>>=1, a=zrb(a, a)) { if(b&1) rt=zrb(rt, a); } return(rt); }
int   C(int n, int r) { return(zrb(fac[n], zrb(inv[r], inv[n-r]))); }
int32_t main(){
    fac[0] = 1;
    for(int i=1;i<N;i++) fac[i] = zrb(fac[i-1], i);
    inv[N-1] = pw(fac[N-1], mod-2); for(int i=N-2;~i;i--) inv[i] = zrb(inv[i+1], i+1);
    scanf("%lld %lld %lld", &n, &m, &k);
    if(m==1) { return !printf("%lld", pw(k, n)); }
    for(int i=0;i<N;i++) dp[i][1] = 1;
    for(int i=2;i<N;i++) for(int j=2;j<=i;j++) dp[i][j] = jm(dp[i-1][j-1], zrb(j, dp[i-1][j]));
    for(int kp=1;kp<=min(n, k);kp++) for(int esht=0;esht<=kp;esht++) if((kp<<1)-esht<=k){
        int sm = 1;
        sm = pw(esht, n*(m-2));
        sm = zrb(sm, C(k, (kp<<1)-esht));
        sm = zrb(sm, C((kp<<1)-esht, esht));
        sm = zrb(sm, C((kp-esht)<<1, kp-esht));
        sm = zrb(sm, pw(dp[n][kp], 2));
        sm = zrb(sm, pw(fac[kp], 2));
        rt = jm(rt, sm);
    }
    printf("%lld", rt);
}

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <streambuf>
#include <string>
#include <utility>
#include <vector>

#define rep(i, n) repb(i, 0, n)
#define repb(i, b, n) repbc(i, b, n, <)
#define repe(i, n) repbe(i, 0, n)
#define repbe(i, b, n) repbc(i, b, n, <=)
#define repbc(i, b, n, c) for(int i = b; i c n; i++)

using namespace std;

typedef long long ll;

#define MOD 1000000007

ll powmod(ll x, ll n) {
  ll res = 1, exp = x;
  while (n > 0LL) {
    if (n & 1) {
      res = (res * exp) % MOD;
    }
    exp = (exp * exp) % MOD;
    n >>= 1;
  }
  return res % MOD;
}

ll inverse(ll i) {
  return powmod(i, MOD - 2) % MOD;
}

vector<ll> fact, rfact;

ll comb(ll n, ll k) {
  if (k > n) return 0;
  return (((fact[n] * rfact[k]) % MOD) * rfact[n - k]) % MOD;
}

int main() {
  fact.push_back(1);
  rfact.push_back(1);
  for (int i = 1; i < 1000001; i++) {
    fact.push_back((fact.back() * (ll) i) % MOD);
    rfact.push_back((rfact.back() * inverse(i)) % MOD);
  }
  ll dp[1010][1010] = {{0}};
  dp[0][0] = 1;
  for (int i = 1; i < 1010; i++) {
    for (int j = 1; j < 1010; j++) {
      dp[i][j] = (((dp[i - 1][j] * (ll)j) % MOD) + dp[i - 1][j - 1]) % MOD;
    }
  }
  /*
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < 10; j++) {
      // cout << comb(i, j) << " ";
      cout << dp[i][j] << " ";
    }
    cout << endl;
  }
  cout << endl;//*/
  ll n, m, k;
  cin >> n >> m >> k;

  ll res = 0;
  for (ll y = 0; y <= n; y++) {
    ll p = powmod(y, n * (m - 2));
    for (ll x = y; x <= n; x++) {
      if (2 * x - y > k) continue;
      ll cur = comb(k, 2 * x - y) % MOD;
      cur *= comb(2 * x - y, x - y);
      cur %= MOD;
      cur *= comb(x, x - y);
      cur %= MOD;
      cur *= dp[n][x];
      cur %= MOD;
      cur *= dp[n][x];
      cur %= MOD;
      cur *= fact[x];
      cur %= MOD;
      cur *= fact[x];
      cur %= MOD;
      cur *= p;
      cur %= MOD;
      res += cur;
      res %= MOD;
    }
  }

  cout << res << endl;
}

#include<stdio.h>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
const int mod=1e9+7;
int mu[100],p[100];
long long int d[1100][1100],d1[1100][1100],f[1100],kk[1100],st[1100];

long long int pw(long long int s,int p){
	if(p==0)return 1;
	if(p==1)return s;
	long long int ans=pw(s,p/2);
	ans=(ans*ans)%mod;
	if(p%2==0)
		return ans;
	else
		return (ans*s)%mod;
}

void solve(int n){
	int b,i,a[30],j,q,w,k,t,m,h;
	scanf("%d%d",&m,&k);
	for(i=0;i<1100;i++)for(j=0;j<1100;j++)d[i][j]=0;
	d[0][0]=1;
	f[0]=1;
	kk[0]=1;
	st[0]=0;
	for(i=1;i<1100;i++){
		f[i]=(f[i-1]*i)%mod;
		kk[i]=(kk[i-1]*(k-i+1))%mod;
		st[i]=pw(i,n*(m-2));
	}
	for(h=1;h<=n;h++){
		for(j=0;j<=h;j++)for(i=0;i<=h&&(j+2*i<=k);i++){
			d1[i][j]=d[i][j]*(i+j);
			if(i>0)d1[i][j]+=d[i-1][j];
			if(j>0)d1[i][j]+=d[i][j-1];
			d1[i][j]%=mod;
		}
		for(j=0;j<=h;j++)for(i=0;i<=h&&(j+2*i<=k);i++){
			d[i][j]=d1[i][j];
		}
	}
	long long int ans=0,c;
	for(j=0;j<=n;j++)for(i=0;i<=n&&(j+2*i<=k);i++){
		c=(d[i][j]*d[i][j])%mod;
		c=(c*f[j])%mod;
		c=(c*kk[j+2*i])%mod;
		if(m>2)c=(c*st[j])%mod;
		ans=(ans+c)%mod;
	}
	printf("%I64d",ans);
}

int main(){
#ifdef _DEBUG
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
#endif _DEBUG

	long long int n,m,x,y,i,j,q=0;
	while(scanf("%I64d",&n)!=EOF){
//	while(gets(c)){
		solve(n);
		printf("\n");
	}

	return 0;
}

/* Author : RISHAV GOYAL */

#include <bits/stdc++.h>
using namespace std;

#define LL long long int
#define UL unsigned long long int

#define imax INT_MAX
#define imin INT_MIN
#define LLmax LLONG_MAX
#define LLmin LLONG_MIN

#define FOR(i,a,b) for(int i= (int)a; i<= (int)b; i++)
#define rep(i,n) for(int i= int(1); i<= (int)n; i++)
#define FORd(i,a,b,d) for(int i=(int)a; i<= (int)b; i+=(int)d)

#define pr() printf("Reached here 1...\n");
#define pr1() printf("Reached here 2...\n");

#define CLR(a) memset(a,0,sizeof(a));
#define SET(a) memset(a,-1,sizeof(a));

#define str strlen
#define pb(x) push_back(x)
#define mp make_pair
#define ii pair<int,int>
#define F first
#define S second
#define gcd(a,b) __gcd(a,b)

#define mod int(1e9 +7)
#define MAX int(1e5 + 10)

#define si(a) scanf("%d",&a);

#define VI vector<int>
#define VL vector<LL>
#define VS vector<string>
#define VC vector<char>

LL powmod(LL a,int b,int n){ if(!a) return 1; LL rm=1;while (b){if (b % 2) { rm = (rm * a) % n; }a = (a * a) % n;b /= 2;}return rm;}

LL s[1010][1010]={0},fac[1000010]={0}, invfac[1010],dpfac[1010][1010]={0}, dp[1010][1010]={0};
int n,m,k;

LL ncr(int n,int r){
	LL ans = (fac[n] * invfac[r]) % mod;
	ans = ans * (powmod(fac[n-r] , mod-2 , mod));
	//else ans = ans * invfac[n-r];
	return ans % mod;
}

int main(){

	cin >> n >> m >> k;
	if(m==1){
		cout << powmod(k,n,mod) << endl;
		return 0;
	}

	LL ans = 0, fans = 0, choose;
	fac[0] = 1;
	for(LL i = 1; i<= 1e6;++i) fac[i] = ( i * fac[i-1] ) % mod;

	LL mul = 1;

	for(LL i=0;i<=1000;++i){
		invfac[i] = powmod(i , mod - 2 , mod);
		if ( i) invfac[i] = (invfac[i] * invfac[i-1]) % mod;
	}

	s[0][0] = 1;
	for(int i=0;i<=1e3;++i){
		for(LL j=0;j<=i;++j){
			s[i+1][j] = (s[i+1][j] + s[i][j] * j) % mod;
			s[i+1][j+1] = ( s[i+1][j+1] + s[i][j]) % mod;
		}
	}
	LL ways , val, ways2;

	for(int totaldist = 1; totaldist <= min(k,n); ++ totaldist){

		for(int shared=1;shared<=totaldist;++shared){
			if(shared+ 2* ( totaldist - shared) > k) continue;
			int T = shared + 2 * ( totaldist - shared );
			ways = ( (ncr(T,totaldist - shared) * ncr(T - (totaldist - shared), shared))%mod * ncr(k,T)) % mod;
 			ways2 = (fac[totaldist] * s[n][totaldist]) % mod;
			ways2 = (ways2 * ways2) % mod;
			val = powmod(shared,n*(m-2),mod);
			val = (val * ways) % mod;
			fans = (val*ways2 + fans) % mod;
		}

	}

	if(m==2){
		for(int x = 1; 2 * x <= k; ++x){
			if(x>n) break;
			val = (ncr(k , x) * ncr(k - x, x)) % mod;
			ways = (fac[x] * s[n][x]) % mod;
			ways = (ways * ways) % mod;
			fans = (fans + ways * val) % mod;
		}
	}

	cout << fans << endl;

	return 0;
}

//ITNOA
#include<bits/stdc++.h>

using namespace std;

#define scan(x) do{while((x=getchar())<'0'); for(x-='0'; '0'<=(_=getchar()); x=(x<<3)+(x<<1)+_-'0');}while(0)
char _;

//#define int long long
#define rep(i, s, e) for(int i = s; i < e; i ++)
#define X first
#define Y second

typedef long long ll;
typedef long double ld;

const int maxN = 1000*1000 + 5;
const int mod = 1000*1000*1000 + 9;
const int mod2 = 1000*1000*1000 + 7;

const int base = 701;
const int SQ = 330;
const int maxL = 302;
int dp[maxN];
int power(int n, int k)
{
    if(k == 0) return 1;
    int ans = power(n,k/2);
    ans = (1LL) * ans * ans % mod;
    if(k % 2) ans = (1LL) * ans * n % mod;
    return ans;
}

int fac[maxN];
int C(int n, int k)
{
    int res = fac[n];
    res = (1LL) * res * power(fac[k],mod-2) % mod;
    res = (1LL) * res * power(fac[n-k],mod-2) % mod;
    return res;
}

int32_t main()
{
    ios::sync_with_stdio(0); cin.tie(0);
    fac[0] = 1;
    rep(i,1,maxN) fac[i] = (1LL) * fac[i-1] * i % mod;

    int n, m, k; cin >> n >> m >> k;
    dp[1] = 1;
    rep(i,2,n+1)
    {
	dp[i] = power(i,n);
	rep(j,1,i)
	{
	    dp[i] -= (1LL) * C(i,j) * dp[j] % mod;
	    if(dp[i] < mod) dp[i] += mod;
	}
    }

    int res = 0;
    rep(i,0,n+1) rep(j,0,n+1-i)
    {
	if(i+j == 0) continue;
	if(2 * i + j > k) continue;

	int cnt = (1LL) * C(k,i) * C(k-i,i) % mod;
	cnt = (1LL) * cnt * C(k-2*i,j) % mod;

	cnt = (1LL) * cnt * dp[i+j] % mod;
	cnt = (1LL) * cnt * dp[i+j] % mod;
	cnt = (1LL) * cnt * power(dp[i],m-2) % mod;

	res = (res + cnt) % mod;
    }

    cout << res << endl;
    return 0;
}

#include<cstdio>
const long long M=1000000007LL;
long long to[1010];
long long mod(long long a,long long b,long long m)
{
    long long ans=1;
    while(b)
    {
        if(b&1)
        ans=ans*a%m;
        a=a*a%m;
        b>>=1;
    }
    return ans;
}
long long c(long long a,long long b)
{
    long long ans=1;
    for(int i=0;i<b;i++)
    {
        ans=ans*(a-i)%M;
        ans=ans*mod(b-i,M-2,M)%M;
    }
    return ans;
}
int main()
{
    int n,m,k;
    scanf("%d%d%d",&n,&m,&k);
    if(m==1)
    {
        long long ans=mod(k,n,M);
        printf("%I64d\n",ans);
        return 0;
    }
    if(m==2)
    {
            int max;
    if(n>k)
    max=k;
    else
    max=n;
    long long ans=0;
    for(int i=1;i<=max;i++)
    {
        long long temp=mod(i,n,M);
        for(int j=i-1;j>=1;j--)
        temp=(temp-c(i,j)*to[j])%M;
        to[i]=temp;

        temp=temp*c(k,i)%M;        temp=mod(temp,m,M);
        ans=(ans+temp)%M;
    }
    printf("%I64d\n",ans);
        return 0;
    }
    int max;
    if(n>k)
    max=k;
    else
    max=n;
    long long ans=0;
    for(int i=1;i<=max;i++)
    {
        long long temp=mod(i,n,M);
        for(int j=i-1;j>=1;j--)
        temp=(temp-c(i,j)*to[j])%M;
        to[i]=temp;
        temp=mod(temp,m,M);
        temp=temp*c(k,i)%M;
        ans=(ans+temp)%M;
    }
    printf("%I64d\n",ans);
}

#include<iostream>
#include<cstdio>
using namespace std;
int n,m,k;
long long ans=0;
long long sum=0;
const long long MOD=1000000007;
long long fac[1000005],rv[1000005];
long long dp[1000006];
long long cal(long long x,long long y)
{
    if(y==0)return 1;
    if(y==1)return x;
    long long tmp=cal(x,y/2);
    if(y&1)
    {
        return tmp*tmp%MOD*x%MOD;
    }
    else
    return tmp*tmp%MOD;
}
long long C(int x,int y){
    return fac[x]*rv[y]%MOD*rv[x-y]%MOD;
}

int main()
{
    cin>>n>>m>>k;
    fac[0]=1,rv[0]=cal(fac[0],MOD-2);
    for (int i=1;i<=min(n,k);i++)
       fac[i]=(long long)fac[i-1]*i%MOD,rv[i]=cal(fac[i],MOD-2);
    if(m==1)
    {
        cout<<cal(k,n);
        return 0;
    }
    for(int i=1;i<=min(n,k);i++)
    {
        dp[i]=cal(i,n);
        for(int j=1;j<i;j++)
        {
            dp[i]=(dp[i]-C(i,j)*dp[j]%MOD+MOD)%MOD;
        }
    }
    if(m==2)
    {
        for(int i=1;i<=min(n,k);i++)
        ans+=dp[i]*dp[i]%MOD*C(k,i)%MOD*C(k,i)%MOD,ans%=MOD;
    }else
    for(int i=1;i<=(n,k);i++)
    {
        for(int j=0;j<=n&&j<=k;j++)
        {
            if(k<2*j+i||i+j>n) break;
            long long tmp=dp[i+j]*dp[i+j]%MOD;
            tmp=((tmp*C(k,i)%MOD)*C(k-i,j)%MOD)*C(k-i-j,j)%MOD;
            tmp=(tmp*cal(i,n*(m-2)))%MOD;
            ans=(ans+tmp)%MOD;
        }
    }
    cout<<ans;
   // system("pause");
    return 0;
}

#include <iostream>
#include <vector>
#include <cstdlib>

using namespace std;

typedef long long int lint;

lint modulo=1000000007;

lint eleva(lint x,lint e)
{
  if (e==0) return 1;
  if (e%2==0) return eleva((x*x)%modulo,e/2);
  return (x*eleva((x*x)%modulo,e/2))%modulo;
}

lint inverso(lint x)
{
  return eleva(x,modulo-2);
}

lint combi(lint n,lint k)
{
  lint r=1;
  for (int i=0;i<k;i++) {
    r=(r*(n-i))%modulo;
    r=(r*inverso(k-i))%modulo;
  }
  return r;
}

vector<vector<lint> > memoria(2001,vector<lint> (2001,-1));

lint combinatori(lint n,lint k)
{
  if (k==0 or k==n) return 1;
  lint &m=memoria[n][k];
  if (m!=-1) return m;
  m=(combinatori(n-1,k-1)+combinatori(n-1,k))%modulo;
  return m;
}

vector<vector<lint> > memoriaaux(2001,vector<lint> (2001,-1));

lint coloca(lint n,lint k)
{
  if (n==0) {
    if (k==0) return 1;
    return 0;
  }
  if (k==0) return 0;
  lint &m=memoriaaux[n][k];
  if (m!=-1) return m;
  m=(k*coloca(n-1,k-1)+k*coloca(n-1,k))%modulo;
  return m;
}

int main()
{
  lint n,m,k;
  cin>>n>>m>>k;
  if (m==1) {
    cout<<eleva(k,n)<<endl;
    exit(0);
  }
  lint opciones=0;
  for (lint kp=1;kp<=2*n and kp<=k;kp++) {
    lint eleccionkp=combi(k,kp);
    for (lint kcomun=0;kcomun<=kp and kcomun<=n;kcomun++) {
      lint kdif=(kp-kcomun)/2;
      if (kcomun+kdif+kdif!=kp or kdif+kcomun>n) continue;
      lint elec=(eleccionkp*combinatori(kp,kcomun))%modulo;
      elec=(elec*combinatori(kp-kcomun,kdif))%modulo;
      elec=(elec*coloca(n,kcomun+kdif))%modulo;
      elec=(elec*coloca(n,kcomun+kdif))%modulo;
      elec=(elec*eleva(kcomun,(m-2)*n))%modulo;
      opciones+=elec;
    }
  }
  cout<<opciones<<endl;
}

#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <iostream>
#include <cmath>
#include <sstream>
#include <map>
#include <set>
#include <numeric>
#include <memory.h>
#include <cstdio>
#include <assert.h>

using namespace std;

#define pb push_back
#define INF 1011111111
#define FOR(i,a,b) for (int _n(b), i(a); i < _n; i++)
#define rep(i,n) FOR(i,0,n)
#define ford(i,a,b) for(int i=(a),_b=(b);i>=_b;--i)
#define CL(a,v) memset((a),(v),sizeof(a))
#define mp make_pair
#define X first
#define Y second
#define all(c) (c).begin(), (c).end()
#define SORT(c) sort(all(c))

typedef long long ll;
typedef vector<int> VI;
typedef pair<int,int> pii;

const ll MOD = 1000000007LL;
const int maxn = 1001;
const int maxk = 1000001;

ll C[2*maxn+1][2*maxn+1];
ll fact[maxk], inv_fact[maxk];
ll dp[maxn*2+1];

ll fpow(ll x, ll n)
{
    ll ans = 1;

    for(; n>0; n >>= 1)
    {
        if(n&1) ans = ans * x % MOD;
        x = x * x % MOD;
    }

    return ans;
}

ll inv(ll x)
{
    return fpow(x, MOD - 2);
}

void precalc()
{
    CL(C,0); CL(fact, 0); CL(inv_fact, 0);

    rep(i,2*maxn+1)
    {
        C[i][0] = C[i][i] = 1;

        FOR(j,1,i) C[i][j] = (C[i-1][j] + C[i-1][j-1]) % MOD;
    }

    fact[0] = 1;
    FOR(i,1,maxk) fact[i] = fact[i-1] * i % MOD;

    rep(i,maxk) inv_fact[i] = inv(fact[i]);

}

ll cnk(int n, int k)
{
    //assert(n >= k);

    return fact[n] * inv_fact[k] % MOD * inv_fact[n-k] % MOD;
}

// Zlobober code

typedef long long llong;

inline llong mul(llong x, llong y)
{
    return ((x * y) % MOD + MOD) % MOD;
}

inline llong sum(llong x, llong y)
{
    return ((x + y) % MOD + MOD) % MOD;
}

inline void SUM(llong& x, llong y)
{
    x = sum(x, y);
}

inline void MUL(llong& x, llong y)
{
    x = mul(x, y);
}

int POW(llong x, llong y)
{
    return (y == 0) ? 1 : mul(1 + ((y % 2) * (x - 1)), POW(mul(x, x), y / 2));
}

const int N = 1050;

inline llong DIV(llong x, llong y)
{
    return mul(x, POW(y, MOD - 2));
}

llong F[N * N];

void count_F()
{
    F[0] = 1;
    for (int i = 1; i < N * N; i++)
        F[i] = mul(F[i - 1], i);
}

const int NN = 2 * N;
llong _C[NN][NN];

void count_C()
{
    _C[0][0] = 1;
    for (int x = 1; x < NN; x++)
        for (int y = 0; y <= NN; y++)
            _C[x][y] = sum((y != 0) * _C[x - 1][y - 1], (y != x) * _C[x - 1][y]);
}

llong CC(llong n, llong k)
{
    if (n < NN)
        return _C[n][k];
    return DIV(DIV(F[n], F[k]), F[n - k]);
}

//

int main()
{
	#ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        //freopen("output.txt","w",stdout);
	#endif

	count_C();
    count_F();

    precalc();

    int n,m,k;
    cin >> n >> m >> k;

    if(m == 1)
    {
        cout << pow(k, n) << endl;
        return 0;
    }

    CL(dp,0);

    FOR(i,1,maxn*2+1)
    {
        dp[i] = fpow(i,n);

        for(int j = i - 1; j >= 1; --j)
        {
            dp[i] -= C[i][j] * dp[j] % MOD;
            dp[i] += MOD;
            dp[i] %= MOD;
//              SUM(dp[i], mul(-CC(i, j), dp[j]));
        }
    }

//    llong DD[maxn*2+1];
//    CL(DD, 0);
//
//    for (int c = 1; c <= maxn*2; c++)
//    {
//        DD[c] = POW(c, n);
//        for (int i = c - 1; i >= 1; i--)
//        {
//            SUM(DD[c], mul(-CC(c, i), DD[i]));
//        }
//    }
//
//    rep(i,maxn)
//    {
//        if(DD[i] != dp[i])
//        {
//            cout << "idx " << i << " dp " << dp[i] << " DD " << DD[i] << endl;
//        }
//    }

    ll ans = 0;

    FOR(total, 1, min(k,2*n) + 1)
    {
        llong tcans = CC(k, total);
        for(int common = (total&1); common <= total; common += 2)
        {
            int single = (total - common)/2;

            if(single + common > n) continue;

            ll tans = fpow(common, (ll)n*(m-2));

            rep(j,2) (tans *= dp[single + common]) %= MOD;

            tans = tans * C[total][common] % MOD;
            tans = tans * C[total - common][single] % MOD;
            //tans = tans * C[k][total] % MOD;

//            (tans *= cnk(total, common)) %= MOD;
//            (tans *= cnk(total - common, single)) %= MOD;

            tans = tans * cnk(k, total) % MOD;

            ans += tans;
            if(ans >= MOD) ans -= MOD;
        }
    }

    cout << ans << endl;

	return 0;
}

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[maxn];
int n,m,k;

void init(){
    int i,j,k;
    memset(C,0,sizeof(C));
    for(i=1;i<maxn;i++)
        C[i][0]=C[i][i]=1;
    for(i=1;i<maxn;i++)
        for(j=1;j<i;j++){
            C[i][j]=(C[i-1][j]+C[i-1][j-1])%mod;
        }
    fac[0]=1;
    for(i=1;i<maxn;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=k && j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1]*(k-j+1))%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }
        lld ans=0;
        for(i=1;i<=k && i<=n;i++){
            ans+=Mul(i,n*(m-2))*(dp[n][i]*dp[n][i]%mod)%mod;
        }
        printf("%I64d\n",ans);
    }
    return 0;
}

#include<stdio.h>
#include<string.h>
#include<iostream>
using namespace std;
typedef long long lld;
#define mod 1000000007
lld multandmod(lld a,lld b)
{
    a=a%mod;
    lld res=0;
    while(b)
    {
        if(b&1)
        {
            res=res+a;
            if(res>=mod)
                res=res-mod;
        }
        a=a<<1;
        if(a>=mod)
            a=a-mod;
        b=b>>1;
    }
    return res;
}
lld modandexp(lld a,lld b)
{
    a=a%mod;
    lld res=1;
    while(b>=1)
    {
        if(b&1)
            res=multandmod(res,a);
        a=multandmod(a,a);
        b=b>>1;
    }
    return res;
}
lld c[2010][2010];
lld ck[2010];
lld fac[1010];
lld dp[1010][1010];
lld k;
lld inv(lld x)
{
    if(x == 1)
        return 1;
    return  inv(mod%x)*(mod-mod/x)%mod;
}
void init()
{
    memset(c,0,sizeof(c));
    c[1][0]=c[1][1]=1;
    for(int i=2;i<=2000;i++)
    {
        c[i][0]=1;
        for(int j=1;j<=i;j++)
            c[i][j]=(c[i-1][j-1]+c[i-1][j])%mod;
    }
    memset(ck,0,sizeof(ck));
    ck[0]=1;
    ck[1]=k;
    for(int i=2;i<=k;i++)
    {
        ck[i]=ck[i-1]*(k-i+1);
        ck[i]%=mod;
        ck[i]*=inv(i);
        ck[i]%=mod;
    }
    fac[0]=1;
    fac[1]=1;
    for(int i=2;i<=1000;i++)
        fac[i]=(fac[i-1]*i)%mod;
    memset(dp,0,sizeof(dp));
    dp[1][0]=0;
    dp[1][1]=1;
    for(int i=2;i<=1000;i++)
        for(int j=1;j<=i;j++)
            dp[i][j]=(dp[i-1][j]*j+dp[i-1][j-1])%mod;
}
int main()
{
    int n,m;
    cin >> n >> m >> k;
    init();
    lld ans=0;
    if(m == 1)
        ans=modandexp(k,n);
    else if(m == 2)
    {
        for(int i=1;i<=n && i<=k;i++)
        {
            lld temp=1;
            temp=(temp*ck[i])%mod;
            temp=(temp*dp[n][i])%mod;
            temp=(temp*fac[i])%mod;
            temp=(temp*ck[i])%mod;
            temp=(temp*dp[n][i])%mod;
            temp=(temp*fac[i])%mod;
            ans=(ans+temp)%mod;
        }
    }
    else
    {
        for(int y=0;y<=n;y++)
        {
            lld f1=modandexp(y,n*(m-2));
            for(int x=y;x<=n;x++)
                if(2*x-y <= k)
                {
                    lld tmp=f1;
                    tmp=(tmp*ck[2*x-y])%mod;
                    tmp=(tmp*c[2*x-y][x-y])%mod;
                    tmp=(tmp*c[x][x-y])%mod;
                    tmp=(tmp*dp[n][x])%mod;
                    tmp=(tmp*fac[x])%mod;
                    tmp=(tmp*dp[n][x])%mod;
                    tmp=(tmp*fac[x])%mod;
                    ans=(ans+tmp)%mod;
                }
        }
    }
    cout << ans << endl;
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <deque>
#include <set>
#include <map>
#include <utility>
#include <string>
#include <cstring>
#include <queue>
#include <algorithm>
#include <cmath>
using namespace std;
#define fi first
#define se second
#define pb(a) push_back(a)
#define sz(a) ((int)(a).size())
#define mp make_pair
#define EPS 1E-9
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
#define MOD 1000000007
ll POW(ll w,ll step){
  ll ret=1;
  for(;step;step>>=1, w=(w*w)%MOD)
   if(step&1)ret=(ret*w)%MOD;
  return ret;
}
ll REV(ll w){return POW(w,MOD-2);}
ll F[1000010],RF[1000010];
ll C(ll el,ll kl){
  return ( (F[el]*RF[kl])%MOD *RF[el-kl] )%MOD;
}
ll dp[2010][2010]; // x cvetami, y kletok
int main(){
  dp[0][0]=1;
  for(int X=1;X<2010;++X)
   for(int Y=X;Y<2010;++Y)
    dp[X][Y]=( X*(dp[X-1][Y-1] + dp[X][Y-1]) )%MOD;
  F[0]=RF[0]=1;
  for(int i=1;i<1000010;++i){F[i]=(i*F[i-1])%MOD; RF[i]=REV(F[i]);}
  ll n,m,k;
  cin>>n>>m>>k;
  if(m==1)cout<<POW(k,n)<<'\n';
  else{
   ll ans=0;
   for(int X=1;X<=n && X<=k;++X)
    for(int Y=X;Y<=2*X && Y<=k;++Y){
     ll cur=( (C(k,X) * C(k-X,Y-X))%MOD * C(X,Y-X) )%MOD;
     cur=( (cur*dp[X][n])%MOD *dp[X][n] )%MOD;
     ans=(ans+cur)%MOD;
                                   }
   cout<<ans<<'\n';
      }
  //system("pause");
  return 0;
}

#include <bits/stdc++.h>
#define ll long long
#define mst(a,x) memset(a,x,sizeof(a))
using namespace std;

const ll MOD = 1e9 + 7;
const int N  = 1005;
ll dp[N][N], ans, Ck[N], c[N][N], fac[N];
int n, m, k;

ll qpow(ll x, int p)
{
	ll ret = 1;

	while(p)
	{
		if(p & 1) ret = ret * x % MOD;
		x = x * x % MOD;
		p >>= 1;
	}
	return ret;
}

void add(ll &x, ll y)
{
	x += y;
	if(x >= MOD) x -= MOD;
}

int main()
{
	ll tmp, mid;

	c[0][0] = 1;
	for(int i = 1; i < N; i++)
	{
		c[i][0] = 1;
		for(int j = 1; j <= i; j++) c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % MOD;
	}
	fac[0] = 1;
	for(int i = 1; i < N; i++) fac[i] = fac[i - 1] * i % MOD;

	scanf("%d%d%d", &n, &m, &k);
	Ck[0] = 1;
	for(int i = 1; i <= k; i++) Ck[i] = Ck[i - 1] * (k - i + 1) % MOD * qpow(i, MOD - 2) % MOD;
	dp[0][0] = 1;
	for(int i = 0; i < n; i++)
		for(int j = 0; j <= min(i, k); j++)
		{
			if(!dp[i][j]) continue;
			add(dp[i + 1][j], dp[i][j] * j % MOD);
			add(dp[i + 1][j + 1], dp[i][j]);
		}
	if(m == 1)
	{
		cout << qpow(k, n) << "\n";
	}
	else
	{
		ans = 0;
		for(int a = 0; a <= min(n, k); a++)
			for(int b = 0; a + b + b <= min(n, k); b++)
			{
				tmp = fac[a + b] * fac[a + b] % MOD * Ck[a + b + b] % MOD;
				tmp = tmp * c[a + b + b][a] % MOD * c[b + b][b] % MOD;
				if(!a)
				{
					if(m == 2) mid = 1;
					else mid = 0;
				}
				else mid = qpow(a, n * m - 2 * n);
				add(ans, tmp * dp[n][a + b] % MOD * dp[n][a + b] % MOD * mid % MOD);
			}
		cout << ans << "\n";
	}
	return 0;
}

#include <algorithm>
#include <deque>
#include <ios>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <array>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <iomanip>

//In The Need Of GOD
//A_Z ;)

using namespace std;
typedef long long ll;

const int N = 1e3 + 30, MOD = 1e9 + 7;

ll dp[N][N], anst, fac[N * N], inv[N * N];
int n, m, k;

ll power(int a, int b){
	if(b == 0) return 1;
	ll tmp = power(a, b/2);
	tmp *= tmp;
	tmp %= MOD;
	if(b % 2) tmp *= a;
	tmp %= MOD;
	return tmp;
}

void build(){
	int mx = 1e6;
	fac[0] = 1;
	for(int i = 1; i <= mx; i++) fac[i] = (fac[i-1] * i) % MOD;
	inv[mx] = power(fac[mx], MOD - 2);
	for(int i = mx; i > 0; i--) inv[i-1] = (inv[i] * i) % MOD;
}

ll entekhab(int a, int b){
	if(a < b) return 0;
	if(b == 0 || b == a) return 1;
	ll ans = fac[a];
	ans *= (inv[b] * inv[a - b]) % MOD;
	ans %= MOD;
	return ans;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL), cout.tie(NULL);
	build();

	cin >> m >> n >> k;

	dp[0][0] = 1;
	for(int i = 1; i <= m; i++){
		for(int j = 1; j <= i; j++){
			dp[i][j] += 1ll * j * dp[i-1][j-1];
			dp[i][j] %= MOD;
			dp[i][j] += 1ll * j * dp[i-1][j];
			dp[i][j] %= MOD;
		}
	}
	int tot = n * m;
	for(int i = 1; i <= min(m, k); i++){
		for(int j = 0; j <= i; j++){
			ll ans = entekhab(k, i);
			ans *= entekhab(i, j);
			ans %= MOD;
			ans *= entekhab((k - i), (i - j));
			ans %= MOD;
			ans *= power(j, (tot - (2 * m)));
			ans %= MOD;
			ans *= dp[m][i];
			ans %= MOD;
			ans *= dp[m][i];
			ans %= MOD;
			anst += ans;
			anst %= MOD;
//			cout << i << " " << j << " " << ans << endl;
		}
	}
	cout << anst << endl;
	return 0;
}

//#define MY_DEBUG

#include <set>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <cmath>
#pragma comment(linker, "/STACK:64000000")

using namespace std;

#ifdef MY_DEBUG
#include <fstream>
ifstream cin("input.txt");
ofstream cout("output.txt");
//ifstream cin("game.in");
//ofstream cout("game.out");
#else
#include <iostream>
#endif

const long double eps =  1e-6;
const long long inf = 1000000007;
const long long linf = (long long)1e18;
const long double pi = acos(-1.0);
const int prime = 53;

inline void finclude(){
#ifdef MY_DEBUG
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    srand(time(NULL));
}

long long mod = 1000000007;
long long dl[1000];

void div(long long b){
    long long k = 0;
    for(int i = dl[0]; i > 0; --i){
        k = k * 10 + dl[i];
        dl[i] = k / b;
        k %= b;
    }
    while(dl[0] > 1 && dl[dl[0]] == 0)
        --dl[0];
}

long long md(long long b){
    long long k = 0;
    for(int i = dl[0]; i > 0; --i){
        k = k * 10 + dl[i];
        dl[i] = k / b;
        k %= b;
    }
    return k;
}

void mul(long long b){
    long long k = 0;
    for(int i = 1; i <= dl[0]; ++i){
        k += dl[i] * b;
        dl[i] = k % 10;
        k /= 10;
    }
    while(k > 0){
        dl[++dl[0]] = k % 10;
        k /= 10;
    }
}

long long C(long long n, long long k){
    dl[0] = dl[1] = 1;
    if (k > n)
        return 0;
    for(long long i = k + 1; i <= n; ++i){
        mul(i);
        div(i - k);
    }
    return md(mod);
}

int main(){
    long long n, m, k, ans = 0;
    cin >> n >> m >> k;
    long long a[1002][1002] = {}, b[1002] = {};
    a[1][1] = 1;
    for(int i = 1; i < n; ++i){
        for(int j = 1; j <= i; ++j){
            a[i + 1][j] += a[i][j] * j;
            a[i + 1][j] %= mod;
            a[i + 1][j + 1] += a[i][j];
            a[i + 1][j + 1] %= mod;
        }
    }
    for(int i = 1; i <= n; ++i){
        b[i] = a[n][i];
        for(int j = 2; j <= i; ++j)
            b[i] = (b[i] * j) % mod;
    }
    long long st[1001][1001];
    for(int i = 0; i <= 1000; ++i){
        st[i][0] = 1;
        for(int j = 1; j <= 1000; ++j)
            st[i][j] = (st[i][j - 1] * i) % mod;
    }
    long long he;
    for(int i = 1; i <= n && i <= k; ++i){
        for(int j = 0; j <= i; ++j){
            he = b[i] * b[i] * C(k, j) * C(k - j, i - j) * C(k - i, i - j);
            he %= mod;
            for(int k = 2; k <= m - 1; ++k){
                he *= st[j][n];
                he %= mod;
            }
            ans += he;
            ans %= mod;
        }
    }
    cout << ans << '\n';
    return 0;
}

/*
	Orz*inf
	Codeforces Round #274 (Div. 1)
*/

#include<cstdio>
#include<algorithm>
#include<cstring>
#include<queue>
#include<map>
#include<vector>
#include<set>
#include<cmath>
#include<cstdlib>
#define rep(i,x,y) for(int i=x;i<=y;++i)
#define dep(i,x,y) for(int i=x;i>=y;--i)
#define LL long long
#define LB long double
#define UL unsigned long long
#define mod 1000000007
#define hash1 100000007
#define hash2 1000000007
#define inf 0x7f7f7f7f
#define infl 0x7f7f7f7f7f7f7f7fll
using namespace std;
inline int lowbit(int x){return x&-x;}
inline int ABS(int x){return x<0?-x:x;}
inline LL ABS(LL x){return x<0?-x:x;}
inline void MAX(int &a,int b){if(b>a)a=b;}
inline void MAX(LL &a,LL b){if(b>a)a=b;}
inline void MIN(int &a,int b){if(b<a)a=b;}
inline void MIN(LL &a,LL b){if(b<a)a=b;}
int fast(int x,int v){int ans=1;for(;v;v>>=1,x=(LL)x*x%mod)if(v&1)ans=(LL)ans*x%mod;return ans;}
LL fast(LL x,LL v){LL ans=1;for(;v;v>>=1,x=x*x%mod)if(v&1)ans=ans*x%mod;return ans;}
inline LL sqr(int x){return x*x;}

#define N 1005
#define E 1000005

int fac[E],inv[E],n,m,K,f[N];

inline int C(int x,int y){
	return (LL)fac[y]*inv[x]%mod*inv[y-x]%mod;
}

int main(){
	scanf("%d%d%d",&n,&m,&K);
	fac[0]=1;
	rep(i,1,E-5) fac[i]=(LL)fac[i-1]*i%mod;
	inv[E-5]=fast(fac[E-5],mod-2);
	dep(i,E-6,1) inv[i]=(LL)inv[i+1]*(i+1)%mod;
	inv[0]=1;

	rep(i,1,n){
		f[i]=fast(i,n);
		rep(j,1,i-1)
			f[i]=(f[i]-(LL)f[j]*C(j,i)%mod+mod)%mod;
	}
	//rep(i,1,n) f[i]=(LL)f[i]*C(i,K)%mod;

	if(m==1){
		printf("%d\n",fast(K,n));
		return 0;
	}

	if(m==2){
		int sum=0;
		rep(i,1,n) sum=(sum+(LL)f[i]*f[i]%mod*C(i,K)%mod*C(i,K)%mod)%mod;
		printf("%d\n",sum);
		return 0;
	}
	int sum=0;
	rep(i,1,n) rep(j,1,i) if(2*i-j<=K)
		sum=(sum+(LL)f[i]*f[i]%mod*C(j,i)%mod*fast(j,(m-2)*n)%mod*C(2*i-j,K)%mod*C(i,2*i-j)%mod)%mod;
	printf("%d\n",sum);
}

#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
long long ff[2005][2005];
typedef long long LL;
const int MX = 1000005;
const int M = 1000000007;
LL inv[MX], f[MX], g[MX];
void init() {
	int i;
	inv[1] = 1;
	for (i = 2; i < MX; i++) inv[i] = inv[M % i] * (M - M/ i) % M;
	f[0] = g[0] = 1;
	for (i = 1; i < MX; i++) {
		f[i] = f[i - 1] * i % M;
		g[i] = g[i - 1] * inv[i] % M;
	}
}
inline LL C(int n, int k) {
	if (k < 0 || k > n) return 0;
	return f[n] * g[k] % M * g[n - k] % M;
}
LL powmod(int n ,int m){
	LL tmp = n ,ans = 1;
	while(m){
		if(m & 1) ans = ans * tmp % mod;
		m >>= 1;
		tmp = tmp * tmp % mod;
	}
	return ans;
}
void calc() {
	init();
	ff[1][1] = 1;
	for(int i = 2 ; i < 2005 ; i ++) {
		for(int j = 1 ; j < 2005 ; j ++) {
			ff[i][j] = j * ff[i - 1][j] + j * ff[i - 1][j - 1];
		}
	}
}
LL ans;
int main() {
	calc();
	int n ,m ,k;
	cin >> n >> m >> k;
	if(m == 1){
		cout << powmod(n ,k) << endl;
		return 0;
	}
	for(int i = 1 ;i <= min(n ,k) ;i ++){
		for(int j = 0 ;j <= i ;j ++){
			LL tmp = 1;
			if(m - 2) {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * (powmod(j ,n * (m - 2)) * C(i ,j) % mod) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
			else {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * C(i ,j) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
//			cout << i << ' ' << j << ' ' << ans << endl;
		}
	}
	cout << ans % mod << endl;
	return 0;
}

#include <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <cmath>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <queue>
#include <memory.h>
#include <stack>
#define mp make_pair
#define pb push_back
#define setval(a,v) memset(a,v,sizeof(a))

#if ( _WIN32 || __WIN32__ )
    #define LLD "%I64d"
#else
    #define LLD "%lld"
#endif

using namespace std;

typedef long long int64;
typedef long double ld;

int dp[1100][1100];

const int MOD = 1000*1000*1000 + 7;

int calc(int n,int k){
    if (k > n)
        return 0;
    if (n == 0)
        return (k == 0);
    if (dp[n][k] != -1)
        return dp[n][k];
    return dp[n][k] = (k*1LL*(calc(n-1,k-1) + calc(n-1,k))) % MOD;
}

int pow(int a,int b){
    if (b == 0)
        return 1;
    if (b & 1)
        return (pow(a,b-1)*1LL*a)%MOD;
    int tmp = pow(a,b>>1);
    return (tmp*1LL*tmp) % MOD;
}

int f[1100*1100];
int invf[1100*1100];

int c(int n,int k){
    if (k > n || n < 0)
        return 0;
    return (((f[n] * 1LL *invf[k]) % MOD) *1LL* invf[n-k]) % MOD;
}

void init(){
    f[0] = 1;
    invf[0] = 1;
    for (int i = 1; i < 1000100; i++){
        f[i] = (f[i-1] * 1LL * i) % MOD;
        invf[i] = pow(f[i],MOD-2);
    }
    memset(dp,-1,sizeof(dp));
}

int main(){
  #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
  #endif
    init();

    int ans = 0;
    int n,m,k;

    scanf("%d %d %d",&n,&m,&k);

    if (m == 1){
        cout << pow (k,n) << endl;
        return 0;
    }

    //cerr << c(1,1) << endl;

    for (int i = 1; i <= n && i <= k; i++){
        int sum2 = 0;
        for (int l = 0; l <= i; l++){
            //cerr <<i <<" "<<l<<" "<< c(i,l)<<" "<<pow(l,n*(m-2)) << endl;
            sum2 = (sum2 + ((c(i,l)*1LL*pow(l,n*(m-2)))%MOD)*1LL*c(k-i,i-l))%MOD;
        }
//        cerr << sum2 << " ";
//        cerr << calc(n,i) << endl;
        ans = ans + (((sum2 * 1LL * (c(k,i) *1LL* calc(n,i))%MOD)%MOD)*1LL*calc(n,i)) % MOD;
    }

    cout << ans << endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

const int N = 1100000;
const int mod = 1000000007;

int L[N], LL[N], R[N], RR[N];

int f[N], g[N], inv[N];

void init() {
	inv[1] = 1;
	for (int i = 2; i < N; i++) inv[i] = 1LL * inv[mod % i] * (mod - mod / i) % mod;
	f[0] = g[0] = 1;
	for (int i = 1; i < N; i++) {
		f[i] = 1LL * f[i-1] * i % mod;
		g[i] = 1LL * g[i-1] * inv[i] % mod;
	}
}

inline int nCm(int n, int m) {
	if (m < 0 || m > n) return 0;
	return 1LL * f[n] * g[m] % mod * g[n - m] % mod;
}

int modExp(int a, int n) {
	int ret = 1;
	for (; n; n >>= 1, a = 1LL * a * a % mod) if (n & 1) ret = 1LL * ret * a % mod;
	return ret;
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("in.txt", "r", stdin);
	freopen("out.txt", "w", stdout);
#endif
	init();
	int n, m, k; scanf("%d%d%d", &n, &m, &k);
	int ans = 0;
	for (int i = n; i < n * m; i += n) {
		int j = n * m - i;
		L[1] = R[1] = LL[1] = RR[1] = 1;
		for (int t = 2; t <= k; t++) {
			L[t] = (modExp(t, i) + mod - 1LL * L[t-1] * t % mod) % mod;
			LL[t] = (LL[t-1] + L[t]) % mod;
			R[t] = (modExp(t, j) + mod - 1LL * R[t-1] * t % mod) % mod;
			RR[t] = (RR[t-1] + R[t]) % mod;
		}
		for (int t = 1; t <= k; t++) {
			int way = nCm(k, t);
			(ans += 1LL * L[t] * R[t] % mod * way % mod * way % mod) %= mod;
//			cerr << L[t] << " " << R[t] << " " << way << endl;
		}
	}
	cout << ans << endl;
	return 0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string.h>
#include <limits.h>
#include <cfloat>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define mem(flag) memset(flag,0,sizeof(flag))
#define Mem(flag) memset(flag,-1,sizeof(flag))
#define read(a) a=getInt()
#define En printf("\n")
#define P(a) printf("%d ",a)
#define Pn(a) printf("%d\n",a)
#define dbg(x) cout << (#x) << " = " << (x) << endl
#define rep(flag, a, b) for (int flag = (a); flag <= (b); ++flag)
#define Rep(flag, a, b) for (int flag = (a); flag >= (b); --flag)

typedef long long ll;
const ll MOD = 1000000007, MAX = 2020;
ll C[MAX][MAX], S[MAX][MAX], P[MAX];
ll CK[MAX];
int n, m, k;
inline ll getC(int a, int b) {
    if (b > a) return 0;
    else return C[a][b];
}
inline ll getS(int a, int b) {
    if (b > a) return 0;
    else return S[a][b];
}

ll powMod(ll a, ll b) {
    if (b == 0) return 1;
    else {
        ll tmp = powMod(a, b / 2);
        if (b % 2 == 0) return tmp * tmp % MOD;
        else return tmp * tmp % MOD * a % MOD;
    }
}

int main() {
    scanf("%d%d%d", &n, &m, &k);
    P[0] = 1;
    for (int i = 1; i <= n; i++) {
        P[i] = P[i - 1] * i % MOD;
    }
    mem(C), mem(S);
    for (int i = 0; i <= 2 * n; i++) {
        for (int j = 0; j <= i; j++) {
            if (j == 0) C[i][j] = 1;
            else {
                C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;
            }
        }
    }
    for (int i = 0; i <= n * 2; i++) {
        for (int j = 0; j <= i; j++) {
            if (j == 0) {
                S[i][j] = i == 0;
            } else {
                S[i][j] = (j * S[i - 1][j] + S[i - 1][j - 1]) % MOD;
            }
        }
    }
    CK[0] = 1;
    for (int i = 1; i <= 2 * n; i++) {
        CK[i] = (CK[i - 1] * (k - i + 1) % MOD * powMod(i, MOD - 2)) % MOD;
    }
    if (m == 1) {
        //Pn(1);
        ll ans = 0;
        for (int x = 1; x <= min(k, n); x++) {
            ans = (ans + CK[x] * S[n][x] * P[x]) % MOD;
        }
        printf("%lld\n",ans);
    } else {
        //Pn(2);
        ll ans = 0;
        for (int u = 1; u <= min(k, 2 * n); u++) {
            ll tmp3 = CK[u], t4 = 0;
            for (int x = 1; x <= u; x++) {
                if (2 * x >= u) {
                    ll tmp = S[n][x] * P[x] % MOD;
                    ll tmp2 = powMod(2 * x - u, n * (m - 2));
                    t4 = (t4 + C[u][x] * C[x][2 * x - u] % MOD * tmp % MOD * tmp % MOD * tmp2 % MOD);
                }
            }
            ans = (ans + t4 * tmp3) % MOD;
            //printf("u = %d ans = %lld\n", u, ans);
        }
        printf("%lld\n", ans);
    }

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define N 1000010
#define mod 1000000007
int dp[N],inv[N],fac[N];
inline int C(int m,int n) {
    return 1LL*fac[n]*inv[m]%mod*inv[n-m]%mod;
}
inline int read() {
    int x=0;
    char ch=getchar();
    while (!isdigit(ch)) ch=getchar();
    while (isdigit(ch)) x=x*10+ch-'0',ch=getchar();
    return x;
}
inline int Pow(int x,int y) {
    int res=1;
    while (y) {
        if (y&1) res=1LL*res*x%mod;
        x=1LL*x*x%mod,y>>=1;
    }
    return res;
}
int main() {
    int n=read(),m=read(),k=read();
    fac[0]=inv[0]=inv[1]=1;
    for (int i=1;i<N;i++) fac[i]=1LL*fac[i-1]*i%mod;
    for (int i=2;i<N;i++) inv[i]=1LL*(mod-mod/i)*inv[mod%i]%mod;
    for (int i=1;i<N;i++) inv[i]=1LL*inv[i-1]*inv[i]%mod;
    // puts("qwq");
    // cout<<C(2,4)<<endl;
    for (int i=1;i<=n;i++) {
        dp[i]=Pow(i,n);
        for (int j=1;j<=i-1;j++) {
            (dp[i]-=1LL*C(j,i)*dp[j]%mod)%=mod;
            if (dp[i]<0) dp[i]+=mod;
        }
    }
    int ans=0;
    if (m==1) {
        return printf("%d\n",Pow(k,n)),0;
    }
    if (m==2) {
        // puts("qwq");
        for (int i=1;i<=n && i<=k;i++) {
            (ans+=1LL*dp[i]*dp[i]%mod*C(i,k)%mod*C(i,k)%mod)%=mod;
        }
        return printf("%d\n",ans),0;
    }
    // for (int i=1;i<=n;i++) printf("%d ",dp[i]);puts("");
    for (int i=0;i<=n && i<=k;i++) {
        int P=Pow(i,n*m-2*m);
        for (int j=0;j<=n && j<=k;j++) {
            if (i+j>n || i+2*j>k) continue;
            // printf("%d %d %d\n",i,j,P);
            (ans+=1LL*C(i,k)*C(j,k-i)%mod*C(j,k-i-j)%mod*P%mod*dp[i+j]%mod*dp[i+j]%mod)%=mod;
        }
    }
    cout<<ans<<endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ii pair<int, int>
#define vi vector<int>
#define pb emplace_back
#define sz(x) (int)x.size()
#define all(v) v.begin(), v.end()
#define x first
#define y second
#define rep(i, j, k) for(i=j; i<k; i++)
#define sep(i, j, k) for(i=j; i>k; i--)
const int N = 1e6+5, inf = 1e9+7;
int n, k, i, j;
int in[N], f[N], dp[1005][1005];
inline int expo(int n, int k, int p = inf) {int r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n % p; n = n * n % p;} return r;}
inline int inv(int a, int p = inf) {return expo(a, p - 2, p);}
inline int cc(int a, int b){ if(a<b || b<0) return 0; return f[a]*in[b]%inf*in[a-b]%inf; }
void fac(){ int i; f[0] = 1; rep(i, 1, N) f[i] = f[i-1]*i%inf; in[N-1] = inv(f[N-1]); sep(i, N-1, 0) in[i-1] = i*in[i]%inf; }

signed main()
{
    ios_base::sync_with_stdio(false); cin.tie(0);
    int i, j, a, b, ans = 0, m;
    fac();
    cin>>n>>m>>k;
    if(m==1) return expo(k, n), 0;
    dp[0][0]=1;
    rep(i, 1, n+1) rep(j, 1, i+1) dp[i][j] = ( dp[i-1][j]*j + dp[i-1][j-1] )%inf;
//  strling numbers of 2nd kind(n distint numbers to k unordered boxes) * k! -> ordered boxes.
    rep(i, 1, n+1) rep(j, 1, i+1) dp[i][j] = dp[i][j]*f[j]%inf;
    rep(i, 1, min(n, k)+1)
        rep(j, 0, i+1) if(k>=2*i-j)
            ans += cc(k, 2*i-j)*cc(2*i-j, i-j)%inf*cc(i, i-j)%inf*expo(j, n*(m-2))%inf* dp[n][i]%inf*dp[n][i]%inf;
    cout<<ans%inf;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define die(x) return cout << x << endl, 0
#define all(o) o.begin(), o.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0), cin.tie(0)
#define FILE freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define SZ(x) ((int)(x).size())
typedef long double ld;
typedef long long ll;
int gcd(int x,int y){ return (!y ? x : gcd(y, x%y)); }
int to_int(string sconvert){stringstream geek(sconvert);int xconvert = 0; geek >> xconvert; return xconvert;}
const int MAXN=2e3+30,MAX_LOG=40,MOD=1e9+7,INF=1e9;
const double PI = acos(-1);
int mod(int x) { return (x % MOD + MOD) % MOD; }
int power(int x,int y){
    if(y==0)return 1;
    int c=power(x,y/2);
    c=(c*c)%MOD;
    if(y%2)c=(c*x)%MOD;
    return c;
}
int n,m,k,ans;
int dp[MAXN][MAXN];
int fact[MAXN*MAXN];
int C(int a,int b){
    if(a>b || a<0)return 0;
    return (fact[b]*power((fact[a]*fact[b-a])%MOD,MOD-2)%MOD)%MOD;
}
int MAIN(){
    cin>>n>>m>>k;
    if(m==1)die(power(k,n));
    fact[0]=1;
    for(int i=1;i<MAXN*MAXN;i++)fact[i]=(fact[i-1]*i)%MOD;
    dp[0][0]=1;
    for(int i=1;i<MAXN;i++){
        for(int j=1;j<=i;j++)dp[i][j]=((dp[i-1][j]*j)%MOD+dp[i-1][j-1])%MOD;
    }
    //cout<<dp[2][2]<<" "<<fact[3]<<endl;
    for(int x=1;x<=min(n,k);x++){
        for(int y=0;y<=x;y++){
            if(2*x-y>k)continue;
            int cnt=((C(2*x-y,k)*C(x-y,2*x-y))%MOD*C(x-y,x))%MOD;
            cnt=((((cnt*power(y,n*(m-2)))%MOD*(dp[n][x]*dp[n][x])%MOD))%MOD*(fact[x]*fact[x])%MOD)%MOD;
            ans=(ans+cnt)%MOD;
           // cout<<cnt<<" "<<x<<" "<<y<<" "<<ans<<endl;
        }
    }
    cout<<ans;
    return 0;
}
int32_t main(){
    IOS;
    int t=1;
    //cin>>t;
    while(t--)MAIN();
    return 0;
}

#include<cstdio>
typedef unsigned ui;
typedef unsigned long long ull;
const ui H=1000000007, N=1000,K=1000010;
ui f[K];
ui pow(ui a,ui m){
	ull ret =1,w=a;
	for( ;m;m>>=1,w*=w,w%=H)
		if(m&1)ret*=w,ret%=H;
	return ui(ret);
}
ull C(ui a,ui b){
	return ull(f[a])*pow(f[a-b],H-2)%H*(f[b],H-2)%H;
}
ui solve(){
	ui n,m,k,i,j,p[N];
	ull a=0,t;
	scanf("%d%d%d",&n,&m,&k);
	if(m==1)return pow(k,n);f[0]=1;
	for(i=1;i<=k;++i)f[i]=ui(ull(f[i-1])*i%H);
	p[0]=0;
	for(i=1;i<=n;++i){
		p[i]=pow(i,n);
		for(j=1;j<i;++j){
			p[i]+=ui(H-p[j]*C(i,j)%H);
			if(p[i]>=H)p[i]-=H;
		}
	}
	for(i=1;i<=n;++i)p[i]=ui(ull(p[i])*p[i] %H);
	for(i=0;i<=n && i<=k;++i){
		t=0;
		for(j=0;j+i<=n && i+j*2<=k;++j)
			t+=p[i+j]*C(k,i)%H*C(k-i,j)%H*C(k-i-j,j)%H;
		a+=t%H*pow(i,n*(m-2))%H;
	}
	return ui(a%H);
}
int main(){
	return printf("%d\n",solve()),0;
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ld long double
#define pb push_back
#define pll pair<ll, ll>
#define vl vector<ll>
#define vvl vector< vector<ll> >
#define vlp vector< pair<ll, ll> >
#define vllp vector<pair<pll, ll> >
#define mll map<ll, ll>
#define rep(i,a)  for(ll i=0; i< a; i++)
#define rep1(i,a)   for(ll i = 1; i< a; i++)
#define foi(i, a, b)    for(ll i = a; i<b ; i++)
#define fod(i, a, b)    for(ll i = a; i>=b ; i--)
#define mp make_pair
#define all(v)  (v).begin(), (v).end()
#define fst first
#define sec second
#define ff first.first
#define fs first.second
#define max3(a, b, c)   max(max(a, b), c)
#define min3(a, b, c)   min(min(a, b), c)
#define MAX 1000001
#define MOD 1000000007
// #define MOD 998244353
#define endl "\n"
#define INF (ll)1e18
#define s(v) (ll)v.size()
#define e(v) v.empty()
#define bscount(x) __builtin_popcountll(x)
// #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>

using namespace std;
// using namespace __gnu_pbds;

ll gcd(ll a, ll b){if(b==0)return a;return gcd(b, a%b);}
ll lcm(ll a, ll b){return a*b/gcd(a, b);}
ll fexp(ll a, ll b){ll ans = 1;while(b){if(b&1) ans = ans*a%MOD; b/=2;a=a*a%MOD;}return ans;}
ll inverse(ll a, ll p){return fexp(a, p-2);}
void ingraph(vvl& graph, ll m){ll x, y;rep(i, m){cin>>x>>y;x--, y--;graph[x].pb(y);graph[y].pb(x);}}
ll modify(ll n){ll res = n;res%=MOD;res+=MOD;res%=MOD;return res;}

int main(){
    #ifndef ONLINE_JUDGE
        freopen("../input.txt", "r", stdin);
        freopen("../output.txt", "w", stdout);
    #endif
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    ll t;
    cin>>t;
    // t = 1;
    while(t--){
        ll n, m;
        cin>>n>>m;
        ll mat[n][m];
        vl sum(n+m-1, 0);
        vl cnt(n+m-1, 0);
        rep(i, n){
            rep(j, m){
                cin>>mat[i][j];
                sum[i+j] += mat[i][j];
                cnt[i+j]++;
            }
        }
        ll ans = 0;
        rep(i, (n+m-1)/2){
            ans += min(cnt[i] + cnt[n+m-2-i] - sum[i] - sum[n+m-2-i], sum[i] + sum[n+m-2-i]);
        }
        cout<<ans<<endl;
    }
}

#include <cstdio>
#define scanf(arg...) (scanf(arg)?:0)

typedef long long ll;

const ll MOD=1e9+7;
const int M=1e6;

ll n, m, k, wynik, silnia[M+5], odwrotnosc[M+5], T[1005][1005];

ll newton(ll n, ll k)
{
  ll ret=silnia[n];
  ret=(ret*odwrotnosc[k])%MOD;
  ret=(ret*odwrotnosc[n-k])%MOD;
  return ret;
}

ll pot(ll x, ll y)
{
  ll ret=1;

  while(y>0)
  {
    if(y%2==1) ret=(ret*x)%MOD;
    x=(x*x)%MOD;
    y/=2;
  }

  return ret;
}

ll oblicz(ll w, ll p)
{
  if(w+2*p>k || w+2*p==0 || w+p>n) return 0;
  ll srodek=(w==0) ? 1 : pot(w,n*(m-2));
  ll ret=(T[n][w+p]*srodek)%MOD;
  ret=(ret*T[n][w+p])%MOD;
  ret=(ret*newton(k,w))%MOD;
  ret=(ret*newton(k-w,p))%MOD;
  ret=(ret*newton(k-w-p,p))%MOD;

  return ret;
}

int main()
{
  scanf("%I64d %I64d %I64d", &n, &m, &k);

  T[1][1]=1;
  for(int i=1; i<=n; i++)
    for(int j=1; j<=i; j++)
    {
      T[i][j]+=T[i-1][j]*ll(j);
      T[i][j]+=T[i-1][j-1]*ll(j);
      T[i][j]%=MOD;
    }

  silnia[0]=1; odwrotnosc[0]=pot(silnia[0], MOD-2);
  for(int i=1; i<=k; i++)
    silnia[i]=(silnia[i-1]*ll(i))%MOD,
    odwrotnosc[i]=pot(silnia[i], MOD-2);

  for(int i=0; i<=n; i++)
    for(int j=0; j<=n; j++)
      wynik=(wynik+oblicz(i,j))%MOD;

  printf("%I64d\n", wynik);

  return 0;
}

//wait darn

#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define pb push_back
#define mp make_pair
#define x first
#define y second

typedef long long ll;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> omset;
typedef pair<ll,ll> pi;
typedef vector<int>::iterator vit;

const int MAXN = 2005;
const int MAXK = 1000005;
const int MAXM = 200005;
const ll INFTY = 1000000000000009;
const ll MOD = 1000000007;

ll N,M,K;
ll chs[MAXK];
ll bin[MAXN][MAXN];
ll cnt[MAXN];

ll exp(ll a, ll n) {
    if(n == 0) return 1;
    else return (n%2)?((exp((a*a)%MOD,n/2)*a) % MOD):(exp((a*a)%MOD,n/2));
}

ll inv(ll a) {return exp(a, MOD-2);}

void input() {cin >> N >> M >> K;}

void init() {
    for(int i = 0; i <= N; i++){
        for(int j = 0; j <= i; j++) {
            if(j == 0 || i == j) {bin[i][j] = 1;}
            else {bin[i][j] = bin[i-1][j-1] + bin[i-1][j];}
        }
    }

    chs[0] = 1;

    for(ll i = 0; i < K; i++) {
        chs[i+1] = (chs[i] * (K-i))%MOD;
        chs[i+1] *= inv(i+1);
        chs[i+1] %= MOD;
    }
}

void solve() {
    ll rando = N*(M-2);

    ll ans = 0;
    ll cur;

    cnt[0] = 0;
    for(int i = 1; i <= N; i++) {
        cnt[i] = exp(i, N);
        for(int j = 1; j < i; j++) {
            cnt[i] -= (bin[i][j] * cnt[j])%MOD;
            cnt[i] += MOD;
            cnt[i] %= MOD;
        }
        cur = 0;
        for(int j = 0; j <= i && i+j <= K; j++) {
            cur = chs[i+j];
            cur %= MOD;
            cur *= bin[i+j][j];
            cur %= MOD;
            cur *= bin[i][j];
            cur %= MOD;
            cur *= exp(i-j,rando);
            cur %- MOD;
            cur *= cnt[i];
            cur %= MOD;
            cur *= cnt[i];
            cur %= MOD;
            ans += cur;
        }
    }

    cout << ans << endl;
}

int main() {
    input();
    init();
    solve();
}

#include <iostream>
#include <vector>
#include <cstdlib>

using namespace std;

typedef long long int lint;

lint modulo=1000000007;

lint eleva(lint x,lint e)
{
  if (e==0) return 1;
  if (e%2==0) return eleva((x*x)%modulo,e/2);
  return (x*eleva((x*x)%modulo,e/2))%modulo;
}

lint inverso(lint x)
{
  return eleva(x,modulo-2);
}

lint combi(lint n,lint k)
{
  lint r=1;
  for (int i=0;i<k;i++) {
    r=(r*(n-i))%modulo;
    r=(r*inverso(k-i))%modulo;
  }
  return r;
}

vector<vector<lint> > memoria(2001,vector<lint> (2001,-1));

lint combinatori(lint n,lint k)
{
  if (k==0 or k==n) return 1;
  lint &m=memoria[n][k];
  if (m!=-1) return m;
  m=(combinatori(n-1,k-1)+combinatori(n-1,k))%modulo;
  return m;
}

vector<vector<lint> > memoriaaux(2001,vector<lint> (2001,-1));

lint coloca(lint n,lint k)
{
  if (n==0) {
    if (k==0) return 1;
    return 0;
  }
  if (k==0) return 0;
  lint &m=memoriaaux[n][k];
  if (m!=-1) return m;
  m=(k*coloca(n-1,k-1)+k*coloca(n-1,k))%modulo;
  return m;
}

int main()
{
  lint n,m,k;
  cin>>n>>m>>k;
  if (m==1) {
    cout<<eleva(k,n)<<endl;
    exit(0);
  }
  lint opciones=0;
  for (lint kp=1;kp<=2*n and kp<=k;kp++) {
    lint eleccionkp=combi(k,kp);
    for (lint kcomun=0;kcomun<=kp and kcomun<=n;kcomun++) {
      if (m>2 and kcomun==0) continue;
      lint kdif=(kp-kcomun)/2;
      if (kcomun+kdif+kdif!=kp or kdif+kcomun>n) continue;
      lint elec=(eleccionkp*combinatori(kp,kcomun))%modulo;
      elec=(elec*combinatori(kp-kcomun,kdif))%modulo;
      elec=(elec*coloca(n,kcomun+kdif))%modulo;
      elec=(elec*coloca(n,kcomun+kdif))%modulo;
      elec=(elec*eleva(kcomun,(m-2)*n))%modulo;
      opciones+=elec;
    }
  }
  cout<<opciones<<endl;
}

#include <bits/stdc++.h>
#define ll long long
#define mod 1000000007
#define upperlimit 1000100
#define INF 1000000100
#define INFL 1000000000000000100
#define eps 1e-8
#define endl '\n'
#define sd(n) scanf("%d",&n)
#define slld(n) scanf("%lld",&n)
#define pd(n) printf("%d",n)
#define plld(n) printf("%lld",n)
#define pds(n) printf("%d ",n)
#define pllds(n) printf("%lld ",n)
#define pdn(n) printf("%d\n",n)
#define plldn(n) printf("%lld\n",n)
#define REP(i,a,b) for(i=a;i<=b;i++)
#define mp make_pair
#define pb push_back
#define pcc pair<char,char>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vi vector<int>
#define vl vector<ll>
#define tr(container,it) for(typeof(container.begin()) it=container.begin();it!=container.end();it++)
#define F first
#define S second

using namespace std;

ll gcd(ll n1,ll n2){
	if(!n1)return n2;
	if(!n2)return n1;
	if(n1%n2==0)return n2;
	return gcd(n2,n1%n2);
}
ll powmod(ll base,ll exponent)
{
	ll ans=1;
	while(exponent){
		if(exponent&1)ans=(ans*base)%mod;
		base=(base*base)%mod;
		exponent/=2;
	}
	return ans;
}
ll fact[upperlimit+1];
ll dp[1010][1010];
ll C(int n,int r){
	if(r<0 || r>n)return 0;
	ll ret=fact[n];
	ret*=powmod((fact[r]*fact[n-r])%mod,mod-2);
	return (ret%mod);
}
ll f(int n,int x){
	if(x>n || x<=0)return 0;
	if(x==1)return 1;
	if(dp[n][x]!=-1)return dp[n][x];
	ll ret=0;
	int i,j;
	for(i=1;i<x;i++){
		ret+=(C(x,i)*f(n,i))%mod;
		ret%=mod;
	}
	ret=(mod+powmod(x,n)-ret)%mod;
	dp[n][x]=ret;
	return ret;
}
int main()
{
	int i,j,k,n,m;
	int x,z;
	sd(n);sd(m);
	sd(k);
	ll answer=0;
	for(i=0;i<1010;i++)for(j=0;j<1010;j++)dp[i][j]=-1;
	fact[0]=1;
	for(i=1;i<=upperlimit;i++)fact[i]=(i*fact[i-1])%mod;
	for(x=0;x<=n;x++)for(z=0;x+z<=n;z++){
		ll temp=(C(k,x)*C(k-x,x))%mod;
		ll temp1=f(n,x+z);
		temp=(temp*C(k-x-x,z))%mod;
		temp=(temp*powmod(z,n*(m-2)))%mod;
		temp=(temp*temp1)%mod;
		temp=(temp*temp1)%mod;
		answer=(answer+temp)%mod;
	}
	if(m==1)answer=powmod(n,k);
	plld(answer);
	return 0;
}

#include<iostream>
#include<cstdio>
using namespace std;
int n,m,k;
long long ans=0;
long long sum=0;
const long long MOD=1000000007;
long long fac[1000005],rv[1000005];
long long dp[1000006];
long long cal(long long x,long long y)
{
    if(y==0)return 1;
    if(y==1)return x;
    long long tmp=cal(x,y/2);
    if(y&1)
    {
        return tmp*tmp%MOD*x%MOD;
    }
    else
    return tmp*tmp%MOD;
}
long long C(int x,int y){
    return fac[x]*rv[y]%MOD*rv[x-y]%MOD;
}

int main()
{
    cin>>n>>m>>k;
    fac[0]=1,rv[0]=cal(fac[0],MOD-2);
    for (int i=1;i<=min(n,k);i++)
       fac[i]=(long long)fac[i-1]*i%MOD,rv[i]=cal(fac[i],MOD-2);
    if(m==1)
    {
        cout<<cal(k,n);
        return 0;
    }
    for(int i=1;i<=min(n,k);i++)
    {
        dp[i]=cal(i,n);
        for(int j=1;j<i;j++)
        {
            dp[i]=(dp[i]-C(i,j)*dp[j]%MOD+MOD)%MOD;
        }
    }
    if(m==2)
    {
        for(int i=1;i<=min(n,k);i++)
        ans+=dp[i]*dp[i]%MOD*C(k,i)%MOD*C(k,i)%MOD,ans%=MOD;
    }else
    for(int i=1;i<=min(n,k);i++)
    {
        for(int j=0;j<=n&&j<=k;j++)
        {
            if(k<2*j+i||i+j>n) break;
            long long tmp=dp[i+j]*dp[i+j]%MOD;
            tmp=((tmp*C(k,i)%MOD)*C(k-i,j)%MOD)*C(k-i-j,j)%MOD;
            tmp=(tmp*cal(i,n*(m-2)))%MOD;
            ans=(ans+tmp)%MOD;
        }
    }
    cout<<ans;
   // system("pause");
    return 0;
}

#include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
#include <set>
#include <map>
#include <queue>
#include <algorithm>

#define MOD 1000000007

using namespace std;

long long P[1010];
long long PP[1010];
long long NCR[2010];
long long NCR2[2010][2010];

long long mexp(long long x, long long p) {
  long long ret = 1;
  for(int i = 63 - __builtin_clzll(p); i >= 0; i--) {
    ret = (ret * ret) % MOD;
    if(p & 1ll << i) ret = (ret * x) % MOD;
  }
  return ret;
}

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

  P[0] = 0;
  for(int i = 1; i < 1010; i++) {
    P[i] = 1;
    for(int j = 0; j < N; j++) {
      P[i] = (P[i] * i) % MOD;
    }
  }
  for(int i = 0; i < 1010; i++) {
    PP[i] = 1;
    for(int j = 2; j < M; j++) {
      PP[i] = (PP[i] * P[i]) % MOD;
    }
  }
  for(int i = NCR2[0][0] = 1; i < 2010; i++) {
    for(int j = NCR2[i][0] = NCR2[i][i] = 1; j < 2010; j++) {
      NCR2[i][j] = (NCR2[i - 1][j - 1] + NCR2[i - 1][j]) % MOD;
    }
  }

  for(int i = NCR[0] = 1; i <= K && i < 2010; i++) {
    NCR[i] = (NCR[i - 1] * (K - i + 1)) % MOD;
    NCR[i] = (NCR[i] * mexp(i, MOD - 2)) % MOD;
  }

  if(M == 1) {
    long long res = 1;
    for(int i = 0; i < N; i++) res = (res * K) % MOD;
    cout << res << endl;
    return 0;
  }

  long long res = 0;
  for(int i = 1; i <= K && i <= N; i++) {
    for(int olp = 0; olp <= i; olp++) {
      if(2 * i - olp > K) continue;

      long long num = ((P[i] - P[i - 1] * i) % MOD + MOD) % MOD;
      num = (num * num) % MOD;
      num = (num * PP[olp]) % MOD;
      num = (num * NCR[2 * i - olp]) % MOD;
      num = (num * NCR2[2 * i - olp][i]) % MOD;
      num = (num * NCR2[i][olp]) % MOD;

      res = (res + num) % MOD;
    }
  }

  cout << res << endl;
}

#include <bits/stdc++.h>

#define FO(i,a,b) for (int i = (a); i < (b); i++)
#define sz(v) int(v.size())

#define MOD 1000000007ll

using namespace std;

typedef long long ll;

int h, w, k;
ll f[1000005], vf[1000005];
ll g[1005][1005];

ll pw(ll i, ll j) {
	ll r = 1;
	while (j) {
		if (j&1) r  = r*i%MOD;
		i = i*i%MOD;
		j/=2;
	}
	return r;
}

ll l(int i) {
	return f[i] * g[h-i][i] % MOD;
}

ll choose(int i, int j) {
	if (j > i) return 0;
	return f[i]*vf[i-j]%MOD*vf[j]%MOD;
}

int main() {
	f[0] = vf[0] = 1;
	FO(i,1,1000005) {
		f[i] = f[i-1]*i%MOD;
		vf[i] = pw(f[i],MOD-2);
	}
	FO(i,0,1005) g[i][1] = g[0][i] = 1;
	FO(i,1,1005) FO(j,2,1005) g[i][j] = (g[i][j-1] + j*g[i-1][j])%MOD;

	scanf("%d%d%d", &h, &w, &k);

	if (w == 1) {
		int res = 0;
		FO(i,1,h+1) res = (res+choose(k,i)*l(i))%MOD;
		printf("%d\n", res);
	} else {
		int res = 0;
		FO(i,1,h+1) {
			FO(j,0,i+1) {
				ll ca = choose(k,i)*choose(i,j)%MOD*choose(k-i,i-j)%MOD;
				ll vl = pw(l(i),2)*pw(l(j),w-2)%MOD;
				res = (res+ca*vl)%MOD;
			}
		}
		printf("%d\n", res);
	}
}

#include<stdio.h>
#include<string.h>

typedef __int64 lld;
const int mod=1000000007;
const int maxn=1005;
lld C[maxn][maxn];
lld dp[maxn][maxn];
lld fac[maxn];
int n,m,k;

void init(){
    int i,j;
    fac[0]=1;
    for(i=1;i<maxn;i++)
        fac[i]=(fac[i-1]*i)%mod;
}

lld Mul(lld a,lld b){
    lld ret=1;
    while(b){
        if(b&1)ret=ret*a%mod;
        b>>=1;
        a=a*a%mod;
    }
    return ret;
}

lld Cal(int x,int y){
    lld tmp=fac[x]*Mul(fac[x-y]*fac[y]%mod,mod-2)%mod;
    return tmp;
}

int main(){
    int i,j;
    init();
    while(scanf("%d%d%d",&n,&m,&k)!=EOF){
        memset(dp,0,sizeof(dp));
        dp[0][0]=1;
        for(i=1;i<=n;i++){
            for(j=1;j<=i;j++){
                dp[i][j]=(dp[i][j]+dp[i-1][j-1])%mod;
                dp[i][j]=(dp[i][j]+dp[i-1][j]*j)%mod;
            }
        }
        lld ans=0;
        if(m==1){
            printf("%I64d\n",Mul(k,n));
        }else{
            for(i=1;i<=n && i<=k;i++){//最左最右个有i
                for(j=(m!=2);j<=i;j++)//都有的j
                    if(k>=2*i-j){
                    lld tp=Cal(k,j)*Mul(j,n*(m-2))%mod;
                    lld tf=Cal(k-j,i-j)*Cal(k-i,i-j)%mod;
                    lld tg=((dp[n][i]*dp[n][i]%mod)*(fac[i]*fac[i]%mod))%mod;
                    ans=(ans+((tp*tf%mod)*tg%mod))%mod;
                }
            }
            printf("%I64d\n",ans);
        }

    }
    return 0;
}

#include <bits/stdc++.h>
#define int long long
using namespace std;

const int N = 1e6 + 7, mod = 1e9 + 7, M = 1000 + 7;

int POW(int a, int b, int mod) {
	a %= mod; int r = 1;
	for(int i = b; i > 0; i >>= 1) {
		if(i & 1) r = (r * a) % mod;
		a = (a * a) % mod;
	}
	return r;
}

int f[N], dp[M][M];

int nCr(int n, int r) {
	if(n < r) return 0;
	return f[n] * POW(f[n - r] * f[r], mod - 2, mod) % mod;
}

int T(int m, int n) {
	if(n == 1) return 1;
	if(n == m) return f[m];
	if(~dp[m][n]) return dp[m][n];
	int res = T(m - 1, n) + T(m - 1, n - 1) % mod;
	return dp[m][n] = res * n;
}

int32_t main() {
	ios_base :: sync_with_stdio(0); cin.tie(0); cout.tie(0);
	f[0] = 1;
	for(int i = 1; i < N; i++) {
		f[i] = (f[i - 1] * i) % mod;
	}
	memset(dp, -1, sizeof dp);
	int ans = 0, n, m, k; cin >> n >> m >> k;

	if(m == 1) {
		for(int i = 1; i <= k && i <= n; i++) {
			ans += nCr(k, i) * T(n, i) % mod;
			ans %= mod;
		}
		cout << ans << endl;
		return 0;
	}
	if(m == 2) {
		for(int i = 1; i <= n && i <= k; i++) {
			int x = (nCr(k, i) * T(n, i) % mod);
			ans += x * x % mod;
			ans %= mod;
		}
		cout << ans << endl;
		return 0;
	}

	for(int i = 1; i <= 2 * n && i <= k; i++) {
		for(int j = 1; j <= i; j++) {
			if((i - j) & 1) continue;
			int x = (i - j) / 2;
			if(x + j > n) continue;
			int aa = nCr(k, i) * nCr(i, j) % mod;
			int bb = nCr(i - j, x) * POW(POW(j, n, mod), m - 2, mod) % mod;
			int cc = T(n, x + j) * T(n, x + j) % mod;
			aa = (aa * bb) % mod;
			aa = (aa * cc) % mod;
			ans = (ans + aa) % mod;
		}
	}
	cout << ans << endl;
}

#include<bits/stdc++.h>
using namespace std;
#define mod 1000000007
long long ff[2005][2005];
typedef long long LL;
const int MX = 1000005;
const int M = 1000000007;
LL inv[MX], f[MX], g[MX];
void init() {
	int i;
	inv[1] = 1;
	for (i = 2; i < MX; i++) inv[i] = inv[M % i] * (M - M/ i) % M;
	f[0] = g[0] = 1;
	for (i = 1; i < MX; i++) {
		f[i] = f[i - 1] * i % M;
		g[i] = g[i - 1] * inv[i] % M;
	}
}
inline LL C(int n, int k) {
	if (k < 0 || k > n) return 0;
	return f[n] * g[k] % M * g[n - k] % M;
}
LL powmod(int n ,int m){
	LL tmp = n ,ans = 1;
	while(m){
		if(m & 1) ans = ans * tmp % mod;
		m >>= 1;tmp = tmp * tmp % mod;
	}
	return ans;
}
void calc() {
	init();
	ff[1][1] = 1;
	for(int i = 2 ; i < 2005 ; i ++) {
		for(int j = 1 ; j < 2005 ; j ++) {
			ff[i][j] = j * ff[i - 1][j] + j * ff[i - 1][j - 1];
		}
	}
}
LL ans;
int main() {
	calc();
	int n ,m ,k;
	cin >> n >> m >> k;
	if(m == 1){
		cout << powmod(n ,k) << endl;
		return 0;
	}
	for(int i = 1 ;i <= min(n ,k) ;i ++){
		for(int j = 0 ;j <= i ;j ++){
			LL tmp = 1;
			if(m - 2) {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * (powmod(j ,n * (m - 2)) * C(i ,j) % mod) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
			else {
				tmp =tmp * (C(k ,i) * ff[n][i] % mod) % mod;
				tmp = tmp * C(i ,j) % mod;
				tmp = tmp * (C(k - i,i - j) * ff[n][i] % mod) % mod;
				ans += tmp % mod;
			}
//			cout << i << ' ' << j << ' ' << ans << endl;
		}
	}
	cout << ans % mod << endl;
	return 0;
}

#include <bits/stdc++.h>
#define endl '\n'

using namespace std;
struct custom_hash
{
    static unsigned long long splitmix64(unsigned long long x)
    {
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(unsigned long long x) const
    {
        static const unsigned long long FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
mt19937 random_generator(chrono::steady_clock::now().time_since_epoch().count());

const int mod = 1e9 + 7;
const int maxn = 1e3 + 3;

int fast_pow(int x, int deg)
{
	int ans = 1, y = x;
	while (deg)
	{
		if (deg & 1)
		ans = 1ll * ans * y % mod;

		deg >>= 1;
		y = 1ll * y * y % mod;
	}

	return ans;
}

int n, m, k;
int fact[maxn], inv_fact[maxn];
int p[maxn];
void precompute()
{
	p[1] = 1;
	for (int i = 2; i <= k; i++)
		p[i] = fast_pow(i, n);

	for (int i = k; i >= 2; i--)
	p[i] = (p[i] - i * p[i-1] % mod + mod) % mod;

	fact[0] = 1;
	for (int i = 1; i <= m; i++)
	fact[i] = 1ll * fact[i-1] * i % mod;

	inv_fact[m] = fast_pow(fact[m], mod-2);
	for (int i = m-1; i >= 0; i--)
	inv_fact[i] = 1ll * inv_fact[i+1] * (i+1) % mod;
}

int add(int a, int b)
{
	a += b;
	if (a >= mod)
	a -= mod;

	return a;
}

int comb(int a, int b)
{
	return 1ll * fact[a] * inv_fact[b] % mod * inv_fact[a-b] % mod;
}

void read()
{
	cin >> n >> m >> k;
}

void solve()
{
	precompute();

	if (m == 1)
	{
		cout << fast_pow(k, n) << endl;
		return;
	}

	if (m == 2)
	{
		int ans = 0;
		for (int j = 1; j <= k; j++)
		ans = add(ans, 1ll * comb(k, j) * comb(k, j) % mod * p[j] % mod * p[j] % mod);

		cout << ans << endl;
		return;
	}

	int ans = 0;
	for (int i = 1; i <= k; i++)
	{
		int mult = fast_pow(i, n * (m-2));
		for (int j = 0; j <= k - i; j += 2)
		ans = add(ans, 1ll * comb(k, i) * comb(k - i, j) % mod * comb(j, j / 2) % mod * mult % mod * p[i+j/2] % mod * p[i+j/2] % mod);
	}

	cout << ans << endl;
}

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);

	read();
	solve();
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long

const ll mod=1000000007;

ll pw(ll b,ll n,ll m=mod,ll a=1){
    while(n){
        if(n&1)a=a*b%m;
        b=b*b%m; n>>=1;
    } return a;
}

ll fac[1000006],ifac[1000006],pr[1004];

ll C(ll n,ll m){
    return fac[n]*ifac[m]%mod*ifac[n-m]%mod;
}

int32_t main(){
    ll n,m,k; cin>>n>>m>>k;
    [&](){
        fac[0]=1;
        for(int i=1;i<1000006;++i)fac[i]=fac[i-1]*i%mod;
        ifac[1000005]=pw(fac[1000005],mod-2);
        for(int i=1000004;i>=0;--i)ifac[i]=ifac[i+1]*(i+1)%mod;
        pr[1]=1;
        for(int i=2;i<=n;++i){
            for(int j=0;j<=i;++j){
                pr[i]+=C(i,j)*pw(i-j,n)%mod*(j&1?-1:1);
            }
            pr[i]%=mod; pr[i]+=mod; pr[i]%=mod;
        }
    }();
    ll ans=0;
    if(m==1)ans=pw(k,n);
    else for(int i=1;i<=n;++i){
        for(int j=0;j<=i;++j){
            ll add=C(k,j)*C(k-j,i-j)%mod*C(k-j-(i-j),i-j)%mod;
            cout<<i<<" "<<j<<" "<<add<<endl;
            add=add*pr[i]%mod*pr[i]%mod;
            cout<<i<<" "<<j<<" "<<add<<endl;
            add=add*pw(j,n*(m-2))%mod;
            cout<<i<<" "<<j<<" "<<add<<endl;
            ans+=add;
        }
    }
    ans%=mod; ans+=mod;
    cout<<ans%mod<<endl;
}

#include <stdio.h>
typedef long long LL;
const LL mod = 1000000007;
const LL MAXK = 1000010;
const LL MAXN = 1010;
LL QuickMul(LL a, LL b, LL p);
LL Inverse(LL a, LL p);
LL Exgcd(LL a, LL b, LL &x, LL &y);
void prepare(); void init(); void gao(); void prLL();

LL ck[MAXK];
LL c[MAXN*2][MAXN*2], d[MAXN][MAXN], f[MAXN];
LL n, m, k;
LL ans;

int main() {
    init();
    prepare();
    gao();
    prLL();
}
void prepare() {
    LL i, j;
    //ck(i) = c(k, i)
    ck[0] = 1;
    for (i = 1; i < k; i++) {
        ck[i] = 1LL*ck[i-1]*(k-i+1)%mod;
        ck[i] = 1LL*ck[i]*Inverse(i, mod)%mod;
    }
    //c(n,k)
    c[1][0] = c[1][1] = 1;
    for (i = 2; i < MAXN+MAXN; i++) {
        c[i][0] = c[i][i] = 1;
        for (j = 1; j < i; j++) c[i][j] = (c[i-1][j]+c[i-1][j-1])%mod;
    }
    //d(n,k)
    for (i = 1; i < MAXN; i++) {
        d[i][0] = 0; d[i][i] = 1;
        for (j = 1; j < i; j++) d[i][j] = (1LL*j*d[i-1][j]+d[i-1][j-1])%mod;
    }
    //f(i)=i!
    f[0] = 1;
    for (i = 1; i < MAXN; i++) f[i] = (1LL*f[i-1]*i)%mod;
}
void init() {
    scanf("%I64d%I64d%I64d", &n, &m, &k);
}
void prLL() {
    printf("%I64d\n", ans);
}
void gao() {
LL y, x;
LL cur, now;
    if (k == 1) { ans = 1; return;}
    if (m == 1) { ans = QuickMul(k, n, mod); return;}
    if (m == 2) {
        ans = 0;
        for (LL i = 1; i <= n; i++)
        if (i <= k) {
            now = 1LL * d[n][i] * f[i] % mod;
            now = now * now % mod;
            now = now*c[k][i]; now %= mod;
            now = now*c[k][i]; now %= mod;
            ans += now; ans %= mod;
        } else break;
        return;
    }
    ans = 0;
    for (y = 0; y <= n; y++) {
        cur = QuickMul(y, n*(m-2), mod);
        for (x = y; x <= n; x++)
        if (x+x-y <= k) {
            now = ck[2*x-y];
            now *= c[2*x-y][x-y]; now %= mod;
            now *= c[x][x-y]; now %= mod;
            now *= f[x]; now %= mod;
            now *= f[x]; now %= mod;
            now *= d[n][x]; now %= mod;
            now *= d[n][x]; now %= mod;
            now *= cur; now %= mod;
            ans += now; ans %= mod;
        } else break;
    }
}
LL QuickMul(LL a, LL b, LL p) {
    LL ans = 1, tmp = a%p;//!a % p, not a; in case that a*b>maxLL
    while (b>0) {
        if (b & 1) ans = (ans*tmp)%p;
        b/=2;
        tmp = (tmp*tmp)%p;
    }
    return ans;
}
LL Exgcd(LL a, LL b, LL &x, LL &y) {
	if (b == 0) {
		x = 1; y = 0;
		return a;
	};
	LL g = Exgcd(b, a%b, x, y);
	LL t = x-a/b*y;
	x = y;
	y = t;
	return g;
}
LL Inverse(LL a, LL p) {
	LL d, x, y;
	d = Exgcd(a, p, x, y);
	if (d != 1) return -1;
	x = (x%p+p)%p;
	return x;
}

#include<cstdio>
#include<cstring>
#include<algorithm>
typedef long long lnt;
const lnt mod=(lnt)(1e9+7);
lnt fac[1000000];
lnt f[1001];
lnt g[1001][1001];
lnt ans;
int n,m,k;
lnt ksm(lnt a,lnt b)
{
	lnt ans=1;
	while(b)
	{
		if(b&1)ans=ans*a%mod;
		a=a*a%mod;
		b=b/2;
	}
	return ans;
}
lnt squ(lnt x)
{
	return x*x%mod;
}
lnt Inv(lnt x)
{
	return ksm(x,mod-2);
}
lnt C(int x,int y)
{
	return fac[x]*Inv(fac[y])%mod*Inv(fac[x-y])%mod;
}
int main()
{
	fac[0]=1;g[0][0]=1;f[1]=1;
	scanf("%d%d%d",&n,&m,&k);
	if(m==1)
	{
		printf("%I64d\n",ksm(k,n));
		return 0;
	}
	for(int i=1;i<=100000;i++)fac[i]=(fac[i-1]*i)%mod;
	/*for(int i=2;i<=n&&i<=k;i++)
	{
		f[i]=ksm(i,n);
		for(int j=1;j<i;j++)
			f[i]-=
	}*/
	for(int i=1;i<=n;i++)
	{
		for(int j=1;j<=i&&j<=k;j++)
		{
			g[i][j]=(g[i-1][j-1]+g[i-1][j]*j)%mod;
		}
	}
	for(int i=1;i<=n&&i<=k;i++) for(int j=i;j<=n&&j<=k&&j*2-i*2<=k-i;j++)
		ans=(ans+C(k,i)*C(k-i,(j-i)*2)%mod*C((j-i)*2,j-i)%mod*squ(g[n][j])%mod*fac[j]%mod*ksm(i,n*(m-2))%mod)%mod;
	printf("%I64d\n",(ans*2%mod+mod)%mod);
	return 0;
}

#include <string>
#include <vector>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <map>
#include <list>
#include <set>
#include <numeric>
#include <queue>
#include <stack>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <climits>
#include <cfloat>
#include <ctime>
#include <complex>
#include <cassert>
#include <array>
#include <bitset>
#include <unordered_map>

using namespace std;
typedef long long LL;
typedef pair<int,int> P;

LL M=1e9+7;
const int L=1001;

// a>=0, b>=0, x*a+y*b=gcd>=0, a>0,b>0=>abs(y)<=a,abs(x)<=b
LL gcdex(LL a,LL b,LL& x, LL& y){
	LL ax=1,ay=0;
	LL bx=0,by=1;
	while(b){
		LL r=a/b;
		LL t=a-r*b; a=b; b=t;
		LL tx=ax-r*bx; ax=bx; bx=tx;
		LL ty=ay-r*by; ay=by; by=ty;
	}
	x=ax;
	y=ay;
	return a;
}
LL modinv(LL a, LL mod){
	LL x,y;
	gcdex(a,mod,x,y);
	if(x<0){
		x+=mod;
	}
	return x;
}
// powmod p^n%mod
LL powmod(LL p,LL n,LL mod){
	LL q=p%mod;
	LL pow=1;
	while(n){
		if(n&1){
			pow*=q;
			pow%=mod;
		}
		q=q*q;
		q%=mod;
		n/=2;
	}
	return pow;
}
const int N=1e6+1;
template<int S>
struct Comb
{
	LL r[S+1];
	LL f[S+1];
	LL mod;
	Comb(int m)
	{
		mod=m;
		f[0]=1;
		r[0]=1;
		for(LL i=1;i<=S;i++){
			f[i]=i*f[i-1]%m;
			r[i]=modinv(i,m)*r[i-1]%m;
		}
	}
	LL c(int n,int i){
		if(i<0||n<i)
		{
			//assert(0);
			return 0;
		}
		return f[n]*r[i]%mod*r[n-i]%mod;
	}
};
Comb<N> comb(M);
LL C(int n,int i){
	return comb.c(n,i);
}
LL mem[L][L];

LL ps[L];
int main() {
	int n,m,k;
	cin >> n >> m >> k;
	for(int i=1;i<=n;i++){
		ps[i]=1;
		for(int j=0;j<n;j++){
			ps[i]*=i;
			ps[i]%=M;
		}
	}
	//cerr << "aa" << endl;
	LL ret=0;
	for(int i=1;i<=n;i++){
		LL v=0;
		LL s=1;
		for(int j=i;j>=1;j--){
			v+=s*ps[j]%M*C(i,j)%M;
			v%=M;
			s*=-1;
		}
		LL p=C(k,i);
		p*=v;
		p%=M;
		//cerr << i << ": " << v << ", " << p << endl;
		if(m==1){
		}
		if(m==2){
			p*=C(k,i);
			p%=M;
			p*=v;
			p%=M;
		}
		else {
			p*=v;
			p%=M;
			p*=powmod(i,(m-2)*n,M);
			p%=M;
		}
		ret+=p;
		ret%=M;
	}
	cout << ret << endl;

	return 0;
}