Dot Product#6467

Dot Product

2 seconds
256 megabytes
Easy

You have two arrays and of the same length. You must process three kinds of queries.

Arrays are -indexed. Initially, both arrays are filled with zeroes.

Input

The first line contains two space-separated integers and : the arrays' lengths and the number of queries, respectively (1 \le n, m \le 10^5). The next lines contain queries in the format described above. In each query 1 \le l \le r \le n and 1 \le x < 10^9 + 7.

Output

For each query of the third type, print its result modulo 10^9 + 7 on a separate line.

Examples

Example 1

Loading
Loading