The input consists of several test cases.
For every test case, there are three integers N (1<=N<=100000), M (1<=M<=100000), I (1<=I<=1000) in the first line, indicating the highway’s length, the numbers of cars and the initial durability of the highway.
Each of the next M lines described the information of cars in the following format:
1 s t d -- There is a truck with d tons’ goods wanted to pass the interval [s, t]. You should check whether the truck can pass it. Notice that if the truck can't pass the whole interval, it will give up the whole passing; otherwise it can pass the highway freely, even if the highway will be broken after the truck’s passing.
2 s t r -- A T1 car will pass the interval [s, t] and increase its durability by r.
3 s t p -- A T2 car will pass the interval [s, t] and increase its durability to p.
You can assume that 1<=s<=t<=N, 1<=d, p, r<=1000
The input ends with N=M=I=0.