Johnny became a controller at the Road Center. His task is to investigate the effectiveness of snow removal on a certain road during a series of blizzards. The road is divided into consecutive one kilometer-long segments, numbered with consecutive integers from 1 to n. Johnny quickly got to work and gathered the information on events:
Johnny pre-processed and sorted the collected data. Unfortunately, computing the answer to queries is too difficult for him. Help him! Write a program that computes the answers to queries of the Road Center.
The first line of the input contains two integers n and q (1≤n≤109,1≤q≤300,000) separated by a single space and denoting, respectively, the number of kilometer segments of the road and the number of events. In each of the following q lines there is a description of an event of one of the following four types:
t L a b, which means that the plow cleared in t-th minute a road fragment consisting of segments numbered from a to b.t S a b s, meaning that a sander spreads salt of quality s in t-th minute on a road fragment consisting of segmentst ? a b, meaning that the Road Center wants to knowt B f g, meaning that t-th minute is the last minute of the previous blizzard (if it exists), and (t+1)-th minute is the first minute of the blizzard with intensity f,g.In all events the following conditions are met: 1≤t≤109,1≤a≤b≤n,1≤s,f,g≤109.
In addition, the values of t for consecutive events are increasing, and the first event is always of type B.
For each event ? print in a separate line the remainder modulo 109+7 of the largest thickness of snow cover at the end of the given minute at the specified road segment.