Sometimes, changing the order of the words in a sentence doesn't influence understanding. For example, if we change "what time is it", into "what time it is"; or change "orz zhang three ak world final", into "zhang orz three world ak final", the meaning of the whole sentence doesn't change a lot, and most people can also understand the changed sentences well.
Formally, we define a sentence as a sequence of words. Two sentences $S$ and $T$ are almost-equal if the two conditions holds:
1. The multiset of the words in $S$ is the same as the multiset of the words in $T$.
2. For a word $\alpha$, its $i^\mathrm{th}$ occurrence in $S$ and its $i^\mathrm{th}$ occurrence in $T$ have indexes differing no more than $1$. (The $k^\mathrm{th}$ word in the sentence has index $k$.) This holds for all $\alpha$ and $i$, as long as the word $\alpha$ appears at least $i$ times in both sentences.
Please notice that "almost-equal" is not a equivalence relation, unlike its name. That is, if sentences $A$ and $B$ are almost-equal, $B$ and $C$ are almost-equal, it is possible that $A$ and $C$ are not almost-equal.
Zhang3 has a sentence $S$ consisting of $n$ words. She wants to know how many different sentences there are, which are almost-equal to $S$, including $S$ itself. Two sentences are considered different, if and only if there is a number $i$ such that the $i^\mathrm{th}$ word in the two sentences are different. As the answer can be very large, please help her calculate the answer modulo $10^9 + 7$.