- There is a grid size of 1*N. The spanning tree of the grid connects all the vertices of the grid only with the edges of the grid, and every vertex has only one path to any other vertex.
Your task is to find out how many different spanning trees in a given grid.
- Every line there is a single integer N(0 < N <= 1000000000), a line of 0 represents the end of the input.
- Every line you should only print the result, as the result may be very large, please module it with 1000000007.
- sample input
- sample output
- When N=1, the spanning trees are an follows:
| | .
There are four ways to construct the spanning tree.
- ASCII & ACman