Codeforces Beta Round 85 (Div. 1 Only)
D
Petya and Coloring
Codeforces
2300
原题
← CE →
翻译中…

Little Petya loves counting. He wants to count the number of ways to paint a rectangular checkered board of size $*n* × *m*$ ($*n*$ rows, $*m*$ columns) in $*k*$ colors. Besides, the coloring should have the following property: for any vertical line that passes along the grid lines and divides the board in two non-empty parts the number of distinct colors in both these parts should be the same. Help Petya to count these colorings.

翻译中…

Input

翻译中…

The first line contains space-separated integers $*n*$, $*m*$ and $*k*$ ($1 ≤ *n*, *m* ≤ 1000, 1 ≤ *k* ≤ 10^{6}$) — the board's vertical and horizontal sizes and the number of colors respectively.

翻译中…

Output

翻译中…

Print the answer to the problem. As the answer can be quite a large number, you should print it modulo $10^{9} + 7$ ($1000000007$).

翻译中…

样例

Input #1
2 2 1
Output #1
1
InputCopy OutputCopy
Input #2
2 2 2
Output #2
8
InputCopy OutputCopy
Input #3
3 2 2
Output #3
40
InputCopy OutputCopy
题目信息
题号
111D
时间限制
5 s
内存限制
256 MB
标签
组合数学
动态规划

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。