Problem Statement
Input is given from Standard Input in the following format:
Snuke will perform the following operation zero or more times:
Find the number of possible final sequences of colors of the stones, modulo 109+7.
Constraints
Input
N
C1
::
CN
Output
Print the number of possible final sequences of colors of the stones, modulo 109+7
5
1
2
1
2
2
3
We can make three sequences of colors of stones, as follows: