SP2962 PAINTBLK - Painting Blocks (Act I)

Description

_n_ blocks are put in a line. You have _k_(1

Input Format

Ten test cases(given one after another, you have to process all!). For each test case, the first line contains an integer _k_, the second line contains _k_ integers, c $ _{1} $ , c $ _{2} $ , ...c $ _{k} $ .

Output Format

Ten lines, each contains an integer, the number of ways modulo 1000000007.