Shil has an array of N elements A1 , A2 .... AN . He wants to perform two types of operations on this array.
Input:
First line of input contains N and Q denoting length of array A and number of operations to be performed respectively.
Next Q lines consists of operations of type 1 or type 2 in the format mentioned above. Each element of array is initially initialized to 0.
Output:
For each operation of type 2 , output the magical value modulo 109 + 7.
Constraints:
In first query , we update A3 to 6.
Answer for second query will be ( f[0]+1)(f[0]+1) , thats 33
Answer for third query will be ( f[0]+1)(f[0]+1) * ( f[6]+1)(f[6]+1) , thats 88 * 22